commit 93e5e4a8604234f7b5cda9e2e10d4d4d94eb4cc4 parent 12c41a9a137bb6c1015c0dbf91cf438c6f976d05 Author: Michael Savage <mikejsavage@gmail.com> Date: Sat Mar 11 10:55:49 +0200 Fix ggformat on Windows Diffstat:
ggformat.cc | | | 5 | +++++ |
diff --git a/ggformat.cc b/ggformat.cc @@ -31,7 +31,12 @@ static void format_helper( FormatBuffer * fb, const ShortString & fmt, const T & len = 0; } +#if PLATFORM_WINDOWS + int printed = snprintf( NULL, 0, fmt.buf, x ); + snprintf( dst, len, fmt.buf, x ); +#else int printed = snprintf( dst, len, fmt.buf, x ); +#endif fb->len += checked_cast< size_t >( printed ); }