From: eck Date: Wed, 25 Jul 1990 10:20:44 +0000 (+0000) Subject: #if X=3 caused infinite loop X-Git-Tag: release-5-5~1636 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=2807862abacc738134e404f358011a6e71a507b2;p=ack.git #if X=3 caused infinite loop --- diff --git a/util/cpp/LLlex.c b/util/cpp/LLlex.c index 8180adb80..70e371823 100644 --- a/util/cpp/LLlex.c +++ b/util/cpp/LLlex.c @@ -53,7 +53,6 @@ GetToken(ptok) again: /* rescan the input after an error or replacement */ LoadChar(c); -go_on: if ((c & 0200) && c != EOI) fatal("non-ascii '\\%03o' read", c & 0377); switch (class(c)) { /* detect character class */ @@ -118,13 +117,11 @@ go_on: PushBack(); return ptok->tk_symb = c; case '=': - if (nch == '=') - return ptok->tk_symb = EQUAL; - /* The following piece of code tries to recognise - old-fashioned assignment operators `=op' - */ - error("illegal character"); - goto go_on; + if (nch != '=') { + PushBack(); + error("missing ="); + } + return ptok->tk_symb = EQUAL; case '>': if (nch == '=') return ptok->tk_symb = GREATEREQ;