X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e2dd624761180dccdb2a542623964c8cd4fdb721..5cbda74b6606482f5286a5599fc60f3f91995a52:/include/wx/private/wxprintf.h diff --git a/include/wx/private/wxprintf.h b/include/wx/private/wxprintf.h index f60d9e8ea9..ff74ee11ca 100644 --- a/include/wx/private/wxprintf.h +++ b/include/wx/private/wxprintf.h @@ -700,11 +700,16 @@ int wxPrintfConvSpec::Process(CharType *buf, size_t lenMax, wxPrintfAr case wxPAT_PCHAR: case wxPAT_PWCHAR: { - wxArgNormalizedString arg(p->pad_str); - wxString s = arg; - - if ( !arg.IsValid() && m_nMaxWidth >= 6 ) - s = wxT("(null)"); + wxString s; + if ( !p->pad_str ) + { + if ( m_nMaxWidth >= 6 ) + s = wxT("(null)"); + } + else if (m_type == wxPAT_PCHAR) + s.assign(static_cast(p->pad_str)); + else // m_type == wxPAT_PWCHAR + s.assign(static_cast(p->pad_str)); typename wxPrintfStringHelper::ConvertedType strbuf( wxPrintfStringHelper::Convert(s));