mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 14:01:49 +00:00
fix BasicParser '\v' and '\x' escapes
This commit is contained in:
parent
06b9cc2ec6
commit
8b0935d2b7
1 changed files with 2 additions and 1 deletions
|
|
@ -397,7 +397,7 @@ std::basic_string<CharT> BasicParser<CharT>::parseString(
|
||||||
ss << (char)parseSimpleInt(8);
|
ss << (char)parseSimpleInt(8);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (c == 'u') {
|
if (c == 'u' || c == 'x') {
|
||||||
int codepoint = parseSimpleInt(16);
|
int codepoint = parseSimpleInt(16);
|
||||||
ubyte bytes[4];
|
ubyte bytes[4];
|
||||||
int size = util::encode_utf8(codepoint, bytes);
|
int size = util::encode_utf8(codepoint, bytes);
|
||||||
|
|
@ -414,6 +414,7 @@ std::basic_string<CharT> BasicParser<CharT>::parseString(
|
||||||
case 'b': ss << '\b'; break;
|
case 'b': ss << '\b'; break;
|
||||||
case 't': ss << '\t'; break;
|
case 't': ss << '\t'; break;
|
||||||
case 'f': ss << '\f'; break;
|
case 'f': ss << '\f'; break;
|
||||||
|
case 'v': ss << '\v'; break;
|
||||||
case '\'': ss << '\''; break;
|
case '\'': ss << '\''; break;
|
||||||
case '"': ss << '"'; break;
|
case '"': ss << '"'; break;
|
||||||
case '\\': ss << '\\'; break;
|
case '\\': ss << '\\'; break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue