Fix incorrect behavior of ReplaceIllegalFileNameChars( wxString& aName, int aReplaceChar ) for non ASCII8 chars.
(this function was using a comparison using chars to test wide chars) Fixes: lp:1764055 https://bugs.launchpad.net/kicad/+bug/1764055
This commit is contained in:
+2
-1
@@ -515,10 +515,11 @@ bool ReplaceIllegalFileNameChars( wxString& aName, int aReplaceChar )
|
||||
bool changed = false;
|
||||
wxString result;
|
||||
result.reserve( aName.Length() );
|
||||
wxString illWChars = GetIllegalFileNameWxChars();
|
||||
|
||||
for( wxString::iterator it = aName.begin(); it != aName.end(); ++it )
|
||||
{
|
||||
if( strchr( illegalFileNameChars, *it ) )
|
||||
if( illWChars.Find( *it ) != wxNOT_FOUND )
|
||||
{
|
||||
if( aReplaceChar )
|
||||
result += aReplaceChar;
|
||||
|
||||
Reference in New Issue
Block a user