Commit 7cf74cb8 authored by Hiroshi Matsunaga's avatar Hiroshi Matsunaga Committed by Wouter van Oortmerssen

cursor_ is not directly represent the hexadecimal

Change-Id: Ibdbd0e2f85284c1443403ed8c43acbd6e9de635f
parent 4fb5a764
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment