From 9a42ec753fc733e39ffa6717ab63898ebd8f70e4 Mon Sep 17 00:00:00 2001 From: Mikolaj Wielgus Date: Tue, 15 Jun 2021 00:11:41 +0200 Subject: [PATCH] Recognize ' ', '}', ')' as terminators of overbar in conversion Fixes bug 3 in https://gitlab.com/kicad/code/kicad/-/issues/8591. --- common/string.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/common/string.cpp b/common/string.cpp index 73358ac2af..c028f6705e 100644 --- a/common/string.cpp +++ b/common/string.cpp @@ -34,7 +34,7 @@ /** - * Illegal file name characters used to insure file names will be valid on all supported + * Illegal file name characters used to ensure file names will be valid on all supported * platforms. This is the list of illegal file name characters for Windows which includes * the illegal file name characters for Linux and OSX. */ @@ -86,6 +86,12 @@ wxString ConvertToNewOverbarNotation( const wxString& aOldStr ) continue; } } + else if( ( *chIt == ' ' || *chIt == '}' || *chIt == ')' ) && inOverbar ) + { + // Spaces were used to terminate overbar as well + newStr << "}"; + inOverbar = false; + } newStr << *chIt; }