summaryrefslogtreecommitdiff
path: root/modules/regex
diff options
context:
space:
mode:
authorrune-scape <allie.smith.epic@gmail.com>2022-12-05 21:46:47 -0500
committerrune-scape <allie.smith.epic@gmail.com>2022-12-05 21:46:47 -0500
commite79be6ce07ed8c89011f759ecade070a3bd5a806 (patch)
treefbe13a625acf7630c4a5aeb4a8664e6c67472818 /modules/regex
parentf3e6750a7e4702918e05f42b1376e30e652f2f90 (diff)
Unify String and StringName
Diffstat (limited to 'modules/regex')
-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;