mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-21 18:08:27 +00:00
cursor_ is not directly represent the hexadecimal
Change-Id: Ibdbd0e2f85284c1443403ed8c43acbd6e9de635f
This commit is contained in:
committed by
Wouter van Oortmerssen
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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user