summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y4
1 files changed, 3 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index 0dde920b2b..3377adb9a6 100644
--- a/parse.y
+++ b/parse.y
@@ -3903,7 +3903,8 @@ yylex()
nondigit = c;
continue;
}
- if (c < '0' || c > '7') break;
+ if (c < '0' || c > '9') break;
+ if (c > '7') goto invalid_octal;
nondigit = 0;
tokadd(c);
} while ((c = nextc()) != -1);
@@ -3920,6 +3921,7 @@ yylex()
}
}
if (c > '7' && c <= '9') {
+ invalid_octal:
yyerror("Illegal octal digit");
}
else if (c == '.' || c == 'e' || c == 'E') {