summaryrefslogtreecommitdiffstats
path: root/lldb/tools/lldb-mi/MICmdArgValFile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/tools/lldb-mi/MICmdArgValFile.cpp')
-rw-r--r--lldb/tools/lldb-mi/MICmdArgValFile.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/tools/lldb-mi/MICmdArgValFile.cpp b/lldb/tools/lldb-mi/MICmdArgValFile.cpp
index cee811f24de..591ee9b358c 100644
--- a/lldb/tools/lldb-mi/MICmdArgValFile.cpp
+++ b/lldb/tools/lldb-mi/MICmdArgValFile.cpp
@@ -193,13 +193,14 @@ CMICmdArgValFile::IsFilePath(const CMIUtilString &vrFileNamePath) const
bool
CMICmdArgValFile::IsValidChars(const CMIUtilString &vrText) const
{
+ static CMIUtilString s_strSpecialCharacters(".'\"`@#$%^&*()_+-={}[]| ");
const MIchar *pPtr = const_cast<MIchar *>(vrText.c_str());
for (MIuint i = 0; i < vrText.length(); i++, pPtr++)
{
const MIchar c = *pPtr;
if (::isalnum((int)c) == 0)
{
- if ((c != '.') && (c != '-') && (c != '_'))
+ if (s_strSpecialCharacters.find(c) == CMIUtilString::npos)
return false;
}
}
OpenPOWER on IntegriCloud