all repos — mgba @ 344364695e4900668c085de57c02f2306f52d85c

mGBA Game Boy Advance Emulator

Fix parsing of numbers starting with 0 (and disregarding octal)
Jeffrey Pfau jeffrey@endrift.com
Thu, 23 Oct 2014 01:50:45 -0700
commit

344364695e4900668c085de57c02f2306f52d85c

parent

61915939b5953db7a04bb9ee254ff356566ebcb4

1 files changed, 15 insertions(+), 0 deletions(-)

jump to
M src/debugger/parser.csrc/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: