From 4973816f90d921701cce9d381086d6edc92bb306 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Fri, 9 Sep 2022 18:08:05 +0100 Subject: [PATCH] Fix errant format specifier. --- eeschema/sch_label.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/eeschema/sch_label.cpp b/eeschema/sch_label.cpp index b5c9f8ce1c..d79d1153a0 100644 --- a/eeschema/sch_label.cpp +++ b/eeschema/sch_label.cpp @@ -86,7 +86,7 @@ bool IncrementLabelMember( wxString& name, int aIncrement ) { name.Remove( ii + 1 ); //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 outputNumber.Printf( outputFormat, number ); name << outputNumber << suffix; @@ -348,12 +348,14 @@ void SCH_LABEL_BASE::Rotate90( bool aClockwise ) bool SCH_LABEL_BASE::IncrementLabel( int aIncrement ) { wxString text = GetText(); - bool ReturnVal = IncrementLabelMember( text, aIncrement ); - if( ReturnVal ) + if( IncrementLabelMember( text, aIncrement ) ) + { SetText( text ); + return true; + } - return ReturnVal; + return false; }