From f6f88e567ef7f2d282991c761ad2c8d106f6b183 Mon Sep 17 00:00:00 2001 From: Raman Date: Tue, 12 Jul 2016 19:47:53 +0200 Subject: [PATCH] Update idl_parser.cpp --- src/idl_parser.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/idl_parser.cpp b/src/idl_parser.cpp index b758e9592..a5f325de4 100644 --- a/src/idl_parser.cpp +++ b/src/idl_parser.cpp @@ -423,6 +423,12 @@ CheckedError Parser::Next() { return NoError(); } else if (isdigit(static_cast(c)) || c == '-') { const char *start = cursor_ - 1; + if (c == '-' && *cursor_ == '0' && (cursor_[1] == 'x' || cursor_[1] == 'X')) { + ++start; + ++cursor_; + attribute_.append(&c, &c + 1); + c = '0'; + } if (c == '0' && (*cursor_ == 'x' || *cursor_ == 'X')) { cursor_++; while (isxdigit(static_cast(*cursor_))) cursor_++;