X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f8991003ff644d27cce66a21d2d762e11b95a793..207e624382313a5081d4af16dc76778d6cbb03a4:/src/common/wxchar.cpp diff --git a/src/common/wxchar.cpp b/src/common/wxchar.cpp index f7649183cc..a7a37548aa 100644 --- a/src/common/wxchar.cpp +++ b/src/common/wxchar.cpp @@ -921,11 +921,12 @@ int wxSprintf( wxChar *str, const wxChar *format, ... ) // note that wxString::Format() uses wxVsnprintf(), not wxSprintf(), so // it's safe to implement this one in terms of it - wxStrcpy(str, wxString::Format(format, argptr)); + wxString s(wxString::Format(format, argptr)); + wxStrcpy(str, s); va_end(argptr); - return ret; + return s.length(); } int wxFprintf( FILE *stream, const wxChar *format, ... )