summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/string.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/string.cpp b/src/string.cpp
index dc8be5f31..24d9c3a34 100644
--- 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));
}