diff options
author | rubidium <rubidium@openttd.org> | 2009-04-06 10:05:36 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-04-06 10:05:36 +0000 |
commit | dc161c72e07c4c26840a8c7fdc9f5f2b78bb0ce7 (patch) | |
tree | 3dfc77767d028e8de61c9816d0a409122894efa6 | |
parent | 0678cb561dd15a1e557f7c472eae30ed59c84095 (diff) | |
download | openttd-dc161c72e07c4c26840a8c7fdc9f5f2b78bb0ce7.tar.xz |
(svn r15963) -Fix [FS#2814]: (v)seprintf chopped of strings one character earlier than necessary.
-rw-r--r-- | src/string.cpp | 2 |
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)); } |