diff options
Diffstat (limited to 'printf.c')
-rw-r--r-- | printf.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -647,7 +647,8 @@ int printf(const char* format, ...) {
va_list va;
va_start(va, format);
- const int ret = _vsnprintf(_out_char, NULL, (size_t)-1, format, va);
+ char buffer[1];
+ const int ret = _vsnprintf(_out_char, buffer, (size_t)-1, format, va);
va_end(va);
return ret;
}
|