remove non-alphanum chars from ident for weird ident responses
This commit is contained in:
+2
-2
@@ -962,7 +962,7 @@ result_t loadScanConfigFile(MessageMap* messages, symbol_t address, bool verbose
|
|||||||
prefix.c_str(), getResultCode(result));
|
prefix.c_str(), getResultCode(result));
|
||||||
auto it = ident.begin();
|
auto it = ident.begin();
|
||||||
while (it != ident.end()) {
|
while (it != ident.end()) {
|
||||||
if (::isspace(*it)) {
|
if (!::isalnum(*it)) {
|
||||||
it = ident.erase(it);
|
it = ident.erase(it);
|
||||||
} else {
|
} else {
|
||||||
*it = static_cast<char>(::tolower(*it));
|
*it = static_cast<char>(::tolower(*it));
|
||||||
@@ -994,7 +994,7 @@ result_t loadScanConfigFile(MessageMap* messages, symbol_t address, bool verbose
|
|||||||
matches = true;
|
matches = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (remain[remain.length()-1] < '0' || remain[remain.length()-1] > '9') {
|
if (!::isdigit(remain[remain.length()-1])) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
remain.erase(remain.length()-1); // remove trailing digit
|
remain.erase(remain.length()-1); // remove trailing digit
|
||||||
|
|||||||
Reference in New Issue
Block a user