Skip to content

Commit 78ac8a7

Browse files
committed
Correct token replacement issue
1 parent c4355ea commit 78ac8a7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/valijson_nlohmann_bundled.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2708,7 +2708,7 @@ inline std::string extractReferenceToken(std::string::const_iterator begin,
27082708
try {
27092709
#endif
27102710
const char c = decodePercentEncodedChar(token.substr(n + 1, 2));
2711-
token.replace(n, 3, &c, 1);
2711+
token.replace(n, 3, 1, c);
27122712
#if VALIJSON_USE_EXCEPTIONS
27132713
} catch (const std::runtime_error &e) {
27142714
throwRuntimeError(

include/valijson/internal/json_pointer.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ inline std::string extractReferenceToken(std::string::const_iterator begin,
111111
try {
112112
#endif
113113
const char c = decodePercentEncodedChar(token.substr(n + 1, 2));
114-
token.replace(n, 3, &c, 1);
114+
token.replace(n, 3, 1, c);
115115
#if VALIJSON_USE_EXCEPTIONS
116116
} catch (const std::runtime_error &e) {
117117
throwRuntimeError(

0 commit comments

Comments
 (0)