diff options
author | Michael Forney <mforney@mforney.org> | 2022-01-23 01:05:27 +0000 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2022-01-23 01:05:27 +0000 |
commit | b9adc507d25ec5f41463d31ef54751c1180c3db2 (patch) | |
tree | 0eb6d4353c535118ce51701ab3d4eb39ae113437 /sys/src/cmd/cc | |
parent | dadaeb584bfec1315561edf3a3470205725de7eb (diff) |
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.
Diffstat (limited to 'sys/src/cmd/cc')
-rw-r--r-- | sys/src/cmd/cc/lex.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/cmd/cc/lex.c b/sys/src/cmd/cc/lex.c index 707fb0bac..6a9f1ea9c 100644 --- a/sys/src/cmd/cc/lex.c +++ b/sys/src/cmd/cc/lex.c @@ -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; |