diff --git a/src/string.cpp b/src/string.cpp --- a/src/string.cpp +++ b/src/string.cpp @@ -26,7 +26,7 @@ static int CDECL vseprintf(char *str, const char *last, const char *format, va_list ap) { if (str >= last) return 0; - size_t size = last - str; + size_t size = last - str + 1; return min((int)size, vsnprintf(str, size, format, ap)); }