From 2807862abacc738134e404f358011a6e71a507b2 Mon Sep 17 00:00:00 2001 From: eck Date: Wed, 25 Jul 1990 10:20:44 +0000 Subject: [PATCH] #if X=3 caused infinite loop --- util/cpp/LLlex.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) 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; -- 2.34.1