From f34805beeb9893dfdb4d38e99d5fd1722ed813cc Mon Sep 17 00:00:00 2001 From: Malin Ejdbo Date: Fri, 12 Feb 2021 16:53:04 +0100 Subject: [PATCH] Remove false matches while matching whole string --- src/scene/scene_lua.inl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/scene/scene_lua.inl b/src/scene/scene_lua.inl index 740a46de70..f468c45dd5 100644 --- a/src/scene/scene_lua.inl +++ b/src/scene/scene_lua.inl @@ -120,6 +120,10 @@ void applyRegularExpression(lua_State* L, const std::string& regex, else if (!nodeName.empty() && id.find(nodeName) == std::string::npos) { continue; } + // Match entire string + else if (id != propertyName) { + continue; + } if (type != prop->typeLua()) { LERRORC( @@ -490,6 +494,10 @@ int property_getProperty(lua_State* L) { else if (!nodeName.empty() && id.find(nodeName) == std::string::npos){ continue; } + // Match entire string + else if (id != propertyName) { + continue; + } res.push_back(id); } @@ -646,6 +654,10 @@ int removeSceneGraphNodesFromRegex(lua_State* L) { if (!nodeName.empty() && identifier.find(nodeName) == std::string::npos) { continue; } + // Match entire string + else if (identifier != propertyName) { + continue; + } foundMatch = true; SceneGraphNode* parent = node->parent();