From 344364695e4900668c085de57c02f2306f52d85c Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Thu, 23 Oct 2014 01:50:45 -0700 Subject: [PATCH] Fix parsing of numbers starting with 0 (and disregarding octal) --- src/debugger/parser.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/debugger/parser.c b/src/debugger/parser.c index 840819e05..a9b1949a0 100644 --- a/src/debugger/parser.c +++ b/src/debugger/parser.c @@ -253,6 +253,21 @@ size_t lexExpression(struct LexVector* lv, const char* string, size_t length) { 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: