From 5e766a0f205d95c0fe264ee3c4c119bc095b81a5 Mon Sep 17 00:00:00 2001 From: ceriel Date: Thu, 3 Nov 1988 15:36:46 +0000 Subject: [PATCH] Fixed bug with underscores in identifiers --- lang/m2/comp/LLlex.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lang/m2/comp/LLlex.c b/lang/m2/comp/LLlex.c index 713f0fb54..28379a683 100644 --- a/lang/m2/comp/LLlex.c +++ b/lang/m2/comp/LLlex.c @@ -355,11 +355,11 @@ again: register t_idf *id; do { - if (ch == '_' && *tag == '_') { - lexerror("an identifier may not contain two consecutive underscores"); - } if (tag - buf < idfsize) *tag++ = ch; LoadChar(ch); + if (ch == '_' && *(tag-1) == '_') { + lexerror("an identifier may not contain two consecutive underscores"); + } } while(in_idf(ch)); UnloadChar(ch); -- 2.34.1