Fix parsing of numbers starting with 0 (and disregarding octal)
Jeffrey Pfau jeffrey@endrift.com
Thu, 23 Oct 2014 01:50:45 -0700
1 files changed,
15 insertions(+),
0 deletions(-)
jump to
M
src/debugger/parser.c
→
src/debugger/parser.c
@@ -253,6 +253,21 @@ lv->token.type = TOKEN_UINT_TYPE;
lv->token.uintValue = next; state = LEX_EXPECT_OPERATOR; break; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + next = token - '0'; + state = LEX_EXPECT_DECIMAL; + break; + default: + state = LEX_ERROR; } break; case LEX_EXPECT_OPERATOR: