Fix a c_str() to wxString conversion memory overflow bug.