Skip to content

Commit c7fc7b4

Browse files
committed
Fixed non-POD varargs.
1 parent 7d0e528 commit c7fc7b4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/string.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1100,7 +1100,7 @@ namespace bx
11001100
break;
11011101

11021102
case 'S':
1103-
size += write(_writer, va_arg(_argList, const StringView), param, _err);
1103+
size += write(_writer, *va_arg(_argList, const StringView*), param, _err);
11041104
break;
11051105

11061106
case 'o':

tests/vsnprintf_test.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,8 @@ TEST_CASE("vsnprintf")
233233
) );
234234

235235
REQUIRE(test("hello, world!", "%S, %S!"
236-
, hello
237-
, world
236+
, &hello
237+
, &world
238238
) );
239239
}
240240

0 commit comments

Comments
 (0)