cc: fix incorrect octal range condition in mpatov

This does not have any adverse effect, since yylex never calls mpatov
with a string with leading 0 (and not 0x) that contains non-octal
digits, but the condition was wrong regardless.
This commit is contained in:
Michael Forney 2022-01-23 01:05:27 +00:00 committed by Ori Bernstein
parent dadaeb584b
commit b9adc507d2

View file

@ -982,7 +982,7 @@ oct:
if(c == 'x' || c == 'X')
goto hex;
while(c = *s++) {
if(c >= '0' || c <= '7')
if(c >= '0' && c <= '7')
nn = n*8 + c-'0';
else
goto bad;