Fix coding error in DoubleValueFromString.

This commit is contained in:
Jeff Young 2021-03-20 12:17:11 +00:00
parent 07aea4339d
commit eb5a85ba91
1 changed files with 1 additions and 5 deletions

View File

@ -347,17 +347,13 @@ double DoubleValueFromString( EDA_UNITS aUnits, const wxString& aTextValue, EDA_
wxChar ch = buf[brk_point];
if( !( (ch >= '0' && ch <= '9') || (ch == decimal_point) || (ch == '-') || (ch == '+') ) )
{
break;
}
++brk_point;
}
// Extract the numeric part
buf.Left( brk_point );
buf.ToDouble( &dtmp );
buf.Left( brk_point ).ToDouble( &dtmp );
// Check the optional unit designator (2 ch significant)
wxString unit( buf.Mid( brk_point ).Strip( wxString::leading ).Left( 2 ).Lower() );