]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix printf arguments validation code for ANSI build.
authorVáclav Slavík <vslavik@fastmail.fm>
Thu, 1 Jul 2010 15:28:35 +0000 (15:28 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Thu, 1 Jul 2010 15:28:35 +0000 (15:28 +0000)
char arguments weren't recognized as allowed variadic types. Unlike in
Unicode build, where chars are treated specially, they are primitive
types in ANSI build.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64790 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/strvararg.h

index cc14ce2ddba1bbd9009dc4980cc4552b9e6a4945..21977e8e4007f1540837886ad167da2d4061f937 100644 (file)
@@ -408,6 +408,12 @@ wxFORMAT_STRING_SPECIFIER(long double, wxFormatString::Arg_LongDouble)
 wxFORMAT_STRING_SPECIFIER(wchar_t, wxFormatString::Arg_Char | wxFormatString::Arg_Int)
 #endif
 
+#if !wxUSE_UNICODE
+wxFORMAT_STRING_SPECIFIER(char, wxFormatString::Arg_Char | wxFormatString::Arg_Int)
+wxFORMAT_STRING_SPECIFIER(signed char, wxFormatString::Arg_Char | wxFormatString::Arg_Int)
+wxFORMAT_STRING_SPECIFIER(unsigned char, wxFormatString::Arg_Char | wxFormatString::Arg_Int)
+#endif
+
 wxFORMAT_STRING_SPECIFIER(char*, wxFormatString::Arg_String | wxFormatString::Arg_Pointer)
 wxFORMAT_STRING_SPECIFIER(unsigned char*, wxFormatString::Arg_String | wxFormatString::Arg_Pointer)
 wxFORMAT_STRING_SPECIFIER(signed char*, wxFormatString::Arg_String | wxFormatString::Arg_Pointer)