fix illegal memory access

This commit is contained in:
Marc-Philip 2017-06-19 13:09:36 +02:00
parent 3e9c24f57f
commit 060c7e7157

View File

@ -685,7 +685,8 @@ int wxVsnprintf(wchar_t *str, size_t size, const wxString& format, va_list argpt
// VsnprintfTestCase reveals that glibc's implementation of vswprintf
// doesn't nul terminate on truncation.
str[size - 1] = 0;
if ( size )
str[size - 1] = 0;
return rv;
}