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:
@@ -1685,7 +1685,10 @@ int wxString::PrintfV(const wxChar* pszFormat, va_list argptr)
|
|||||||
buf[size] = _T('\0');
|
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
|
// ok, there was enough space
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user