fix for C99-compatible vsnprintf()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23531 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
1c9c480e80
commit
caff62f22d
@ -1685,7 +1685,10 @@ int wxString::PrintfV(const wxChar* pszFormat, va_list argptr)
|
||||
buf[size] = _T('\0');
|
||||
}
|
||||
|
||||
if ( len >= 0 )
|
||||
// vsnprintf() may return either -1 (traditional Unix behaviour) or the
|
||||
// total number of characters which would have been written if the
|
||||
// buffer were large enough
|
||||
if ( len >= 0 && len <= size )
|
||||
{
|
||||
// ok, there was enough space
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user