- if (nargs == wxMAX_SVNPRINTF_ARGUMENTS)
- {
- wxLogDebug(wxT("A single call to wxVsnprintf() has more than %d arguments; ")
- wxT("ignoring all remaining arguments."), wxMAX_SVNPRINTF_ARGUMENTS);
- break; // cannot handle any additional conv spec
- }
- }
- else
+ // special handling for specifications including asterisks: we need
+ // to reserve an extra slot (or two if asterisks were used for both
+ // width and precision) in specs array in this case
+ for ( const char *f = strchr(spec->m_szFlags, '*');
+ f;
+ f = strchr(f + 1, '*') )
+ {
+ if ( nargs++ == wxMAX_SVNPRINTF_ARGUMENTS )
+ break;
+
+ // TODO: we need to support specifiers of the form "%2$*1$s"
+ // (this is the same as "%*s") as if any positional arguments
+ // are used all asterisks must be positional as well but this
+ // requires a lot of changes in this code (basically we'd need
+ // to rewrite Parse() to return "*" and conversion itself as
+ // separate entries)
+ if ( posarg_present )