diff --git a/src/string.cpp b/src/string.cpp index d477bbe..9cfd948 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -1100,7 +1100,7 @@ namespace bx break; case 'S': - size += write(_writer, va_arg(_argList, const StringView), param, _err); + size += write(_writer, *va_arg(_argList, const StringView*), param, _err); break; case 'o': diff --git a/tests/vsnprintf_test.cpp b/tests/vsnprintf_test.cpp index 2cf1416..c218069 100644 --- a/tests/vsnprintf_test.cpp +++ b/tests/vsnprintf_test.cpp @@ -233,8 +233,8 @@ TEST_CASE("vsnprintf") ) ); REQUIRE(test("hello, world!", "%S, %S!" - , hello - , world + , &hello + , &world ) ); }