X-Git-Url: https://secure.softndesign.org/git/?a=blobdiff_plain;f=parser.c;h=05b89c936b8a6d96b868f440aed06adc5323a4fa;hb=3c0db5bc8265a0af1d630553c4cae77bd17f5457;hp=a6992c83c10dbaebcb074d155f0e10eaead341e4;hpb=686c4bc2a512a57b6c672792b6b44e2d61458dfb;p=calc.git diff --git a/parser.c b/parser.c index a6992c8..05b89c9 100644 --- a/parser.c +++ b/parser.c @@ -209,6 +209,10 @@ element_t *parser (char *str, char **next, int prio) } root->ops[0] = new; } + if (*str != ')') { + delelement (root); + return ERROR_OP; + } str++; VERBOSE (DEBUG, fprintf (stdout, "stop processing bracket\n")); continue;