diff options
author | Darkvater <darkvater@openttd.org> | 2007-01-13 13:13:32 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2007-01-13 13:13:32 +0000 |
commit | c09b7e7fac5ebeeccc52432d9f74377d3e3845d4 (patch) | |
tree | bbe986be8188f48fda83701e66c16b0f96d39d04 | |
parent | 120f57b865b22089b8a359dc6593a092319d2478 (diff) | |
download | openttd-c09b7e7fac5ebeeccc52432d9f74377d3e3845d4.tar.xz |
(svn r8090) -[win32] Fix (r8089): for *nprintf 'ret = count' NOT 'ret = 0'...
-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 eeca3e809..872b6e08f 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -169,7 +169,7 @@ int CDECL vsnprintf(char *str, size_t size, const char *format, va_list ap) { int ret; ret = _vsnprintf(str, size, format, ap); - if (ret < 0 || ret == 0) str[size - 1] = '\0'; + if (ret < 0 || ret == size) str[size - 1] = '\0'; return ret; } #endif /* _MSC_VER */ |