From de5ced474d17b979666023ba2980493069d3401e Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Wed, 3 Apr 2024 23:18:33 +0200 Subject: [PATCH] do not parse +N constants The parsing code for these constants conflicts with the Tplus token. --- parse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parse.c b/parse.c index 3717a6f..20303e9 100644 --- a/parse.c +++ b/parse.c @@ -203,7 +203,7 @@ getint() n = 0; c = fgetc(inf); m = (c == '-'); - if (m || c == '+') + if (m) c = fgetc(inf); do { n = 10*n + (c - '0'); @@ -277,7 +277,7 @@ lex() lnum++; return Tnl; } - if (isdigit(c) || c == '-' || c == '+') { + if (isdigit(c) || c == '-') { ungetc(c, inf); tokval.num = getint(); return Tint;