mirror of
https://github.com/tristanpenman/valijson.git
synced 2024-12-12 10:13:51 +01:00
Correct token replacement issue
This commit is contained in:
parent
c4355eaa47
commit
78ac8a737d
@ -2708,7 +2708,7 @@ inline std::string extractReferenceToken(std::string::const_iterator begin,
|
||||
try {
|
||||
#endif
|
||||
const char c = decodePercentEncodedChar(token.substr(n + 1, 2));
|
||||
token.replace(n, 3, &c, 1);
|
||||
token.replace(n, 3, 1, c);
|
||||
#if VALIJSON_USE_EXCEPTIONS
|
||||
} catch (const std::runtime_error &e) {
|
||||
throwRuntimeError(
|
||||
|
@ -111,7 +111,7 @@ inline std::string extractReferenceToken(std::string::const_iterator begin,
|
||||
try {
|
||||
#endif
|
||||
const char c = decodePercentEncodedChar(token.substr(n + 1, 2));
|
||||
token.replace(n, 3, &c, 1);
|
||||
token.replace(n, 3, 1, c);
|
||||
#if VALIJSON_USE_EXCEPTIONS
|
||||
} catch (const std::runtime_error &e) {
|
||||
throwRuntimeError(
|
||||
|
Loading…
Reference in New Issue
Block a user