From c03d003515704bafe7f7b3d0d3781f4cb9deb6f7 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 26 Aug 2002 21:15:04 +0000 Subject: [PATCH] another fix to the wxFormatConverter bug with the formats which don't have to be converted git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16796 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/wxchar.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/common/wxchar.cpp b/src/common/wxchar.cpp index 4da43cbd34..c19ed120c7 100644 --- a/src/common/wxchar.cpp +++ b/src/common/wxchar.cpp @@ -566,7 +566,10 @@ class wxFormatConverter public: wxFormatConverter(const wxChar *format); - operator const wxChar *() const { return m_nCopied ? m_fmtOrig : m_fmt.c_str(); } + // notice that we only translated the string if m_fmtOrig == NULL (as set + // by CopyAllBefore()), otherwise we should simply use the original format + operator const wxChar *() const + { return m_fmtOrig ? m_fmtOrig : m_fmt.c_str(); } private: // copy another character to the translated format: this function does the @@ -577,7 +580,7 @@ private: { if ( !m_fmtOrig ) { - // we're translating, d copy + // we're translating, do copy m_fmt += ch; } else