]> git.saurik.com Git - wxWidgets.git/commitdiff
compilation fix for the last wxSprintf() change
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 20 Mar 2004 13:44:06 +0000 (13:44 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 20 Mar 2004 13:44:06 +0000 (13:44 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26285 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/wxchar.cpp

index f7649183cc31c5e792aef2bc67663cae7912c6cb..a7a37548aa1184d5bada10f7dcc2ddeccf4f6a22 100644 (file)
@@ -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, ... )