X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0f895b0cf5c0ab0f6da406efe7adbff14fd10456..f239a20092359e3c914adb79bd39f3f5d2b2e06f:/src/common/strvararg.cpp?ds=sidebyside diff --git a/src/common/strvararg.cpp b/src/common/strvararg.cpp index 0e1b1592af..a4c2256dfb 100644 --- a/src/common/strvararg.cpp +++ b/src/common/strvararg.cpp @@ -375,7 +375,7 @@ private: size_t m_nCopied; }; -#ifdef __WINDOWS__ +#if defined(__WINDOWS__) && !defined(__CYGWIN__) // on Windows, we should use %s and %c regardless of the build: class wxPrintfFormatConverterWchar : public wxFormatConverterBase @@ -642,6 +642,9 @@ wxFormatString::ArgumentType DoGetArgumentType(const CharType *format, wxPrintfConvSpecParser parser(format); + wxCHECK_MSG( n <= parser.nargs, wxFormatString::Arg_Unknown, + "more arguments than format string specifiers?" ); + wxCHECK_MSG( parser.pspec[n-1] != NULL, wxFormatString::Arg_Unknown, "requested argument not found - invalid format string?" );