summaryrefslogtreecommitdiff
path: root/modules/regex/regex.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/regex/regex.cpp')
-rw-r--r--modules/regex/regex.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/regex/regex.cpp b/modules/regex/regex.cpp
index c808211d68..6f02d20c25 100644
--- a/modules/regex/regex.cpp
+++ b/modules/regex/regex.cpp
@@ -50,8 +50,7 @@ int RegExMatch::_find(const Variant &p_name) const {
return -1;
}
return i;
-
- } else if (p_name.get_type() == Variant::STRING) {
+ } else if (p_name.get_type() == Variant::STRING || p_name.get_type() == Variant::STRING_NAME) {
HashMap<String, int>::ConstIterator found = names.find((String)p_name);
if (found) {
return found->value;