Fix built-in wxPrintf() for repeated positional parameters
Allow wxPrintf("%1$s %1$s", "foo") to work.
Take into account the possibility that the number of format specifiers
and the number of actual arguments can be different.
Closes #9367.
This commit is contained in:
@@ -139,7 +139,7 @@ static int wxDoVsnprintf(CharType *buf, size_t lenMax,
|
||||
|
||||
// finally, process each conversion specifier with its own argument
|
||||
const CharType *toparse = format;
|
||||
for (i=0; i < parser.nargs; i++)
|
||||
for (i=0; i < parser.nspecs; i++)
|
||||
{
|
||||
wxPrintfConvSpec<CharType>& spec = parser.specs[i];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user