diff --git a/eeschema/libfield.cpp b/eeschema/libfield.cpp index cb9fbc6209..0231644b09 100644 --- a/eeschema/libfield.cpp +++ b/eeschema/libfield.cpp @@ -64,8 +64,7 @@ void LIB_EDIT_FRAME::EditField( LIB_FIELD* aField ) if( dlg.ShowQuasiModal() != wxID_OK ) return; - newFieldValue = dlg.GetText(); - LIB_ID::FixIllegalChars( newFieldValue, LIB_ID::ID_SCH ); + newFieldValue = LIB_ID::FixIllegalChars( dlg.GetText(), LIB_ID::ID_SCH ); wxString oldFieldValue = aField->GetFullText( m_unit ); bool renamed = aField->GetId() == VALUE && newFieldValue != oldFieldValue;