From: Raman Date: Tue, 12 Jul 2016 17:47:53 +0000 (+0200) Subject: Update idl_parser.cpp X-Git-Tag: v1.4.0~31^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f6f88e567ef7f2d282991c761ad2c8d106f6b183;p=platform%2Fupstream%2Fflatbuffers.git Update idl_parser.cpp --- diff --git a/src/idl_parser.cpp b/src/idl_parser.cpp index b758e95..a5f325d 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_++;