cursor_ is not directly represent the hexadecimal
Change-Id: Ibdbd0e2f85284c1443403ed8c43acbd6e9de635f
This commit is contained in:
parent
4fb5a764df
commit
7cf74cb864
|
@ -124,7 +124,8 @@ int64_t Parser::ParseHexNum(int nibbles) {
|
||||||
if (!isxdigit(cursor_[i]))
|
if (!isxdigit(cursor_[i]))
|
||||||
Error("escape code must be followed by " + NumToString(nibbles) +
|
Error("escape code must be followed by " + NumToString(nibbles) +
|
||||||
" hex digits");
|
" hex digits");
|
||||||
auto val = StringToInt(cursor_, 16);
|
std::string target(cursor_, cursor_ + nibbles);
|
||||||
|
auto val = StringToInt(target.c_str(), 16);
|
||||||
cursor_ += nibbles;
|
cursor_ += nibbles;
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue