* BUG: Fix the Like-pattern matching of the XmlElement.GetChildrenByAttributeValue() method.

git-svn-id: svn://localhost/gambas/trunk@6358 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Adrien Prokopowicz 2014-07-02 21:33:03 +00:00
parent 433b9fa9ac
commit c2e7d79812
2 changed files with 3 additions and 3 deletions

View File

@ -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<void **>((GB.Array.Add(*array)))) = XMLNode_GetGBObject(node);
GB.Ref(node->GBObject);

View File

@ -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;
}