wxSymbolPickerDialog crashes on ampersand character
|Reported by:||ikamakj||Owned by:|
wxSymbolPickerDialog::UpdateSymbolDisplay() incorrectly uses SetLabel() to update the character shown in the static control. If the user happens to select the ampersand, SetLabel() interprets it as the escape character for a mnemonic, but there is no character following the ampersand. This results in a crash on non-Windows platforms (observed on wxOSX/Carbon) where the ampersand must be removed with wxStripMenuCodes() before passing the text to an OS function. The correct function to call here would be SetLabelText().
It might be a good idea anyway to correct wxStripMenuCodes() so as avoid a crash in case an ampersand incorrectly occurs at the end of the string.