summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2007-01-13 13:13:32 +0000
committerDarkvater <Darkvater@openttd.org>2007-01-13 13:13:32 +0000
commit47a7b714e35589cce8573d117cc85148a8269910 (patch)
treebbe986be8188f48fda83701e66c16b0f96d39d04
parent1b6467b0e3e2958ec98f522c056c84d297519bf3 (diff)
downloadopenttd-47a7b714e35589cce8573d117cc85148a8269910.tar.xz
(svn r8090) -[win32] Fix (r8089): for *nprintf 'ret = count' NOT 'ret = 0'...
-rw-r--r--src/string.cpp2
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 */