From 7cf74cb8644262f8ca02d69705bbc394d66514ce Mon Sep 17 00:00:00 2001 From: Hiroshi Matsunaga Date: Fri, 9 Jan 2015 03:38:14 +0900 Subject: [PATCH] cursor_ is not directly represent the hexadecimal Change-Id: Ibdbd0e2f85284c1443403ed8c43acbd6e9de635f --- src/idl_parser.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/idl_parser.cpp b/src/idl_parser.cpp index ef0fb7480..8eabc895f 100644 --- a/src/idl_parser.cpp +++ b/src/idl_parser.cpp @@ -124,7 +124,8 @@ int64_t Parser::ParseHexNum(int nibbles) { if (!isxdigit(cursor_[i])) Error("escape code must be followed by " + NumToString(nibbles) + " hex digits"); - auto val = StringToInt(cursor_, 16); + std::string target(cursor_, cursor_ + nibbles); + auto val = StringToInt(target.c_str(), 16); cursor_ += nibbles; return val; }