From 47a7b714e35589cce8573d117cc85148a8269910 Mon Sep 17 00:00:00 2001 From: Darkvater Date: Sat, 13 Jan 2007 13:13:32 +0000 Subject: (svn r8090) -[win32] Fix (r8089): for *nprintf 'ret = count' NOT 'ret = 0'... --- src/string.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 */ -- cgit v1.2.3-70-g09d2