From 96eb11cb9e1ce73b0b909355660a0a974f34705e Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 5 Jul 2025 00:55:56 -0600 Subject: [PATCH] Don't assume strings are non-empty (KICAD-PMX). --- pcbnew/pcb_dimension.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/pcb_dimension.cpp b/pcbnew/pcb_dimension.cpp index 0e97e45e54..fa5796bdd1 100644 --- a/pcbnew/pcb_dimension.cpp +++ b/pcbnew/pcb_dimension.cpp @@ -446,7 +446,7 @@ wxString PCB_DIMENSION_BASE::GetValueText() const { text.RemoveLast(); - if( text.Last() == '.' || text.Last() == sep ) + if( text.EndsWith( '.' ) || text.EndsWith( sep ) ) { text.RemoveLast(); break;