X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c57cdbd8d6df510b2381fba2e79103ffda7bdce4..db71eb0640221199170ac9ea83371c2d467fa456:/src/common/wxchar.cpp diff --git a/src/common/wxchar.cpp b/src/common/wxchar.cpp index f8c44d1361..10bcd27cb4 100644 --- a/src/common/wxchar.cpp +++ b/src/common/wxchar.cpp @@ -196,7 +196,7 @@ bool WXDLLEXPORT wxOKlibc() // implemented later in this file using wxVsnprintf() and that would // result in an endless recursion and thus in a stack overflow #if wxUSE_UNICODE - #if defined(__WINDOWS__) + #if defined(__WINDOWS__) && !defined(HAVE_SWPRINTF) // all compilers under Windows should have swprintf() #define HAVE_SWPRINTF #endif @@ -209,7 +209,9 @@ bool WXDLLEXPORT wxOKlibc() (defined(__VISUALC__) && __VISUALC__ < 1400) || \ defined(__GNUWIN32__) || \ defined(__BORLANDC__) - #define HAVE_BROKEN_SWPRINTF_DECL + #ifndef HAVE_BROKEN_SWPRINTF_DECL + #define HAVE_BROKEN_SWPRINTF_DECL + #endif #endif // problem: on some systems swprintf takes the 'max' argument while on @@ -578,6 +580,8 @@ bool wxPrintfConvSpec::Parse(const wxChar *format) case wxT('p'): m_type = wxPAT_POINTER; + m_szFlags[flagofs++] = ch; + m_szFlags[flagofs] = '\0'; done = true; break; @@ -982,7 +986,7 @@ int wxPrintfConvSpec::Process(wxChar *buf, size_t lenMax, wxPrintfArg *p) case wxPAT_POINTER: #if wxUSE_STRUTILS { - wxASSERT(lenScratch >= 0 && lenScratch < wxMAX_SVNPRINTF_SCRATCHBUFFER_LEN); + wxASSERT( /* lenScratch >= 0 && */ lenScratch < wxMAX_SVNPRINTF_SCRATCHBUFFER_LEN); if (lenMax < lenScratch) { // fill output buffer and then return -1