Skip to content

Commit 56b5938

Browse files
committed
Fix fuzzer
1 parent 407c905 commit 56b5938

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/fuzzing/chrono-duration.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ void invoke_inner(fmt::string_view format_str, Rep rep) {
1212
auto value = std::chrono::duration<Rep, Period>(rep);
1313
try {
1414
#if FMT_FUZZ_FORMAT_TO_STRING
15-
std::string message = fmt::format(format_str, value);
15+
std::string message = fmt::format(fmt::runtime(format_str), value);
1616
#else
1717
auto buf = fmt::memory_buffer();
18-
fmt::format_to(std::back_inserter(buf), format_str, value);
18+
fmt::format_to(std::back_inserter(buf), fmt::runtime(format_str), value);
1919
#endif
2020
} catch (std::exception&) {
2121
}

0 commit comments

Comments
 (0)