From c2e7d7981207746cc8f4152e3fd23a3caca5e181 Mon Sep 17 00:00:00 2001 From: Adrien Prokopowicz Date: Wed, 2 Jul 2014 21:33:03 +0000 Subject: [PATCH] [GB.XML] * BUG: Fix the Like-pattern matching of the XmlElement.GetChildrenByAttributeValue() method. git-svn-id: svn://localhost/gambas/trunk@6358 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- gb.xml/src/node.cpp | 4 ++-- gb.xml/src/utils.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gb.xml/src/node.cpp b/gb.xml/src/node.cpp index d379fff68..1349e0b24 100644 --- a/gb.xml/src/node.cpp +++ b/gb.xml/src/node.cpp @@ -388,10 +388,10 @@ void XMLNode_addGBChildrenByAttributeValue(Node *node, const char *attrName, con { if(node->type == Node::ElementNode) { - Attribute *attr = XMLElement_GetAttribute((Element*)node, attrName, lenAttrName, mode); + Attribute *attr = XMLElement_GetAttribute((Element*)node, attrName, lenAttrName); if(attr) { - if(GB_MatchString(attr->attrValue, attr->lenAttrValue, attrValue, lenAttrValue)) + if(GB_MatchString(attr->attrValue, attr->lenAttrValue, attrValue, lenAttrValue, mode)) { *(reinterpret_cast((GB.Array.Add(*array)))) = XMLNode_GetGBObject(node); GB.Ref(node->GBObject); diff --git a/gb.xml/src/utils.cpp b/gb.xml/src/utils.cpp index 1d1ba1ef6..e1fef8abb 100644 --- a/gb.xml/src/utils.cpp +++ b/gb.xml/src/utils.cpp @@ -198,7 +198,7 @@ bool GB_MatchString(const char *str, size_t lenStr, const char *pattern, size_t } else if(mode == GB_STRCOMP_LIKE) { - if(GB.MatchString(str, lenStr, pattern, lenPattern)) + if(GB.MatchString(pattern, lenPattern, str, lenStr) == true) { return true; }