Fix errant format specifier.

This commit is contained in:
Jeff Young 2022-09-09 18:08:05 +01:00
parent 6507a4165e
commit 4973816f90
1 changed files with 6 additions and 4 deletions

View File

@ -86,7 +86,7 @@ bool IncrementLabelMember( wxString& name, int aIncrement )
{ {
name.Remove( ii + 1 ); name.Remove( ii + 1 );
//write out a format string with correct number of leading zeroes //write out a format string with correct number of leading zeroes
outputFormat.Printf( "%%0%dd", dCount ); outputFormat.Printf( "%%0%dld", dCount );
//write out the number using the format string //write out the number using the format string
outputNumber.Printf( outputFormat, number ); outputNumber.Printf( outputFormat, number );
name << outputNumber << suffix; name << outputNumber << suffix;
@ -348,12 +348,14 @@ void SCH_LABEL_BASE::Rotate90( bool aClockwise )
bool SCH_LABEL_BASE::IncrementLabel( int aIncrement ) bool SCH_LABEL_BASE::IncrementLabel( int aIncrement )
{ {
wxString text = GetText(); wxString text = GetText();
bool ReturnVal = IncrementLabelMember( text, aIncrement );
if( ReturnVal ) if( IncrementLabelMember( text, aIncrement ) )
{
SetText( text ); SetText( text );
return true;
}
return ReturnVal; return false;
} }