]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/wxchar.cpp
Fixed MinGW/ANSI (and probably any other C++ compiler, excluding, of course,
[wxWidgets.git] / src / common / wxchar.cpp
index db698b6e5750b39ed991985fc28acac83c6aa3bc..f36473d75c57e0607af80e4e23f51daacbaadfd0 100644 (file)
@@ -302,8 +302,11 @@ int WXDLLEXPORT wxVsnprintf_(wxChar *buf, size_t lenMax,
                             size_t val = va_arg(argptr, size_t);
                             ::sprintf(szScratch, s_szFlags, val);
                         }
-
-                        APPEND_STR(wxConvLibc.cMB2WX(szScratch));
+                        {
+                            const wxMB2WXbuf tmp =
+                                wxConvLibc.cMB2WX(szScratch);
+                            APPEND_STR(tmp);
+                        }
 
                         done = TRUE;
                         break;
@@ -323,8 +326,11 @@ int WXDLLEXPORT wxVsnprintf_(wxChar *buf, size_t lenMax,
                             double val = va_arg(argptr, double);
                             ::sprintf(szScratch, s_szFlags, val);
                         }
-
-                        APPEND_STR(wxConvLibc.cMB2WX(szScratch));
+                        {
+                            const wxMB2WXbuf tmp =
+                                wxConvLibc.cMB2WX(szScratch);
+                            APPEND_STR(tmp);
+                        }
 
                         done = TRUE;
                         break;
@@ -337,7 +343,9 @@ int WXDLLEXPORT wxVsnprintf_(wxChar *buf, size_t lenMax,
                             s_szFlags[flagofs] = '\0';
                             ::sprintf(szScratch, s_szFlags, val);
 
-                            APPEND_STR(wxConvLibc.cMB2WX(szScratch));
+                            const wxMB2WXbuf tmp =
+                                wxConvLibc.cMB2WX(szScratch);
+                            APPEND_STR(tmp);
 
                             done = TRUE;
                         }