From bd0606736df6eb948dece81807117c6ca771c401 Mon Sep 17 00:00:00 2001 From: vsv Date: Fri, 22 Mar 2019 11:41:21 +0300 Subject: [PATCH] Issue #2888: Limit symbols for parameters names --- src/XGUI/XGUI_Tools.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/XGUI/XGUI_Tools.cpp b/src/XGUI/XGUI_Tools.cpp index 9ec6c6b28..a5b71682c 100644 --- a/src/XGUI/XGUI_Tools.cpp +++ b/src/XGUI/XGUI_Tools.cpp @@ -155,6 +155,16 @@ bool isAscii(const QString& theStr) aCh = theStr[i].toLatin1(); if (aCh == 0) return false; + if ((aCh >= 0x30) && (aCh <= 0x39)) + continue; + else if ((aCh >= 0x41) && (aCh <= 0x5A)) + continue; + else if ((aCh >= 0x61) && (aCh <= 0x7A)) + continue; + else if (aCh == 0x5f) + continue; + else + return false; } return true; } -- 2.39.2