mirror of
https://github.com/nlohmann/json.git
synced 2026-10-09 16:07:14 +00:00
Fix character skipping after a surrogate pair
In a string the first character following a surrogate pair is skipped by the lexer, but the rest of the string is parsed as usual.
This commit is contained in:
1 parent
3948630374
commit
ec7a1d8347
3 files changed
+9
-4
No files matched your search
+2
-2
@@ -6856,8 +6856,8 @@ basic_json_parser_59:
|
||||
auto codepoint2 = std::strtoul(std::string(reinterpret_cast<typename string_t::const_pointer>
|
||||
(i + 7), 4).c_str(), nullptr, 16);
|
||||
result += to_unicode(codepoint, codepoint2);
|
||||
// skip the next 11 characters (xxxx\uyyyy)
|
||||
i += 11;
|
||||
// skip the next 10 characters (xxxx\uyyyy)
|
||||
i += 10;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+2
-2
@@ -6162,8 +6162,8 @@ class basic_json
|
||||
auto codepoint2 = std::strtoul(std::string(reinterpret_cast<typename string_t::const_pointer>
|
||||
(i + 7), 4).c_str(), nullptr, 16);
|
||||
result += to_unicode(codepoint, codepoint2);
|
||||
// skip the next 11 characters (xxxx\uyyyy)
|
||||
i += 11;
|
||||
// skip the next 10 characters (xxxx\uyyyy)
|
||||
i += 10;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user