From b1a046e821900affb64c4a267c653a6a7eafd94c Mon Sep 17 00:00:00 2001 From: Mattia Barbon Date: Sun, 8 Sep 2002 22:52:59 +0000 Subject: [PATCH] Fix wxSnvprintf (and hence wxString::Format) for Unicode, when using the wxSnvprintf in wxchar.cpp. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17088 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/wxchar.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/common/wxchar.cpp b/src/common/wxchar.cpp index db698b6e57..65309fdef0 100644 --- a/src/common/wxchar.cpp +++ b/src/common/wxchar.cpp @@ -302,8 +302,10 @@ 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)); + { + wxMB2WXbuf tmp = wxConvLibc.cMB2WX(szScratch); + APPEND_STR(tmp); + } done = TRUE; break; @@ -323,8 +325,10 @@ int WXDLLEXPORT wxVsnprintf_(wxChar *buf, size_t lenMax, double val = va_arg(argptr, double); ::sprintf(szScratch, s_szFlags, val); } - - APPEND_STR(wxConvLibc.cMB2WX(szScratch)); + { + wxMB2WXbuf tmp = wxConvLibc.cMB2WX(szScratch); + APPEND_STR(tmp); + } done = TRUE; break; @@ -337,7 +341,8 @@ int WXDLLEXPORT wxVsnprintf_(wxChar *buf, size_t lenMax, s_szFlags[flagofs] = '\0'; ::sprintf(szScratch, s_szFlags, val); - APPEND_STR(wxConvLibc.cMB2WX(szScratch)); + wxMB2WXbuf tmp = wxConvLibc.cMB2WX(szScratch); + APPEND_STR(tmp); done = TRUE; } -- 2.45.2