diff --git a/examples/valijson_nlohmann_bundled.hpp b/examples/valijson_nlohmann_bundled.hpp index 05ae5c0..806f329 100644 --- a/examples/valijson_nlohmann_bundled.hpp +++ b/examples/valijson_nlohmann_bundled.hpp @@ -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( diff --git a/include/valijson/internal/json_pointer.hpp b/include/valijson/internal/json_pointer.hpp index 6328407..24240fb 100644 --- a/include/valijson/internal/json_pointer.hpp +++ b/include/valijson/internal/json_pointer.hpp @@ -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(