← Back to team overview

kicad-developers team mailing list archive

Bug: ThrowIOError with GetChars() formatting parameter

 

Hi,
Playing with the spectra import/export, I encountered a bug: in that
code are constructs such as

   ThrowIOError( _("some formatting %s"), GetChars( someWxString ));

They are ultimately dealt with wxString::PrintfV( fmt, args );

The output, however, is not as expected. A someWxString with "REF**"
was only displayed as "R". Changing the GetChars() to TO_UTF8() works.

I suspect that whatever is returned by GetChars() is not properly
passed through the var-args argument, while the simple const char* of
TO_UTF8() does work. I am not sure though if that is the 'right'
solution as this might be different on Windows ? So I'll leave this to
someone more knowledgeable in wxString quirks on different platforms
...

-h


Follow ups