CmpNoCase() returns 0 for a match (which evals to false as a bool).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18087
This commit is contained in:
Jeff Young 2024-05-25 12:01:06 +01:00
parent 89fa83bcc2
commit 26fe4c05e1
1 changed files with 6 additions and 5 deletions

View File

@ -907,11 +907,12 @@ bool ApplyModifier( double& value, const wxString& aString )
}
if( units.length()
&& !units.CmpNoCase( wxT( "F" ) )
&& !units.CmpNoCase( wxT( "hz" ) )
&& !units.CmpNoCase( wxT( "W" ) )
&& !units.CmpNoCase( wxT( "V" ) )
&& !units.CmpNoCase( wxT( "H" ) ) )
&& !units.IsSameAs( wxT( "F" ), false )
&& !units.IsSameAs( wxT( "hz" ), false )
&& !units.IsSameAs( wxT( "W" ), false )
&& !units.IsSameAs( wxT( "V" ), false )
&& !units.IsSameAs( wxT( "A" ), false )
&& !units.IsSameAs( wxT( "H" ), false ) )
{
return false;
}