source: packages/libs/ezxml/patches/203-ezxml_cut.patch @ 23054

Last change on this file since 23054 was 23054, checked in by rhk, 6 years ago

[packages] ezxml: update PKG_RELEASE and rename patches

File size: 1.1 KB
  • ezxml.c

    a b ezxml_t ezxml_cut(ezxml_t xml) 
    10421042 
    10431043            cur = xml->parent->child; // go back to head of subtag list 
    10441044            if (strcmp(cur->name, xml->name)) { // not in first sibling list 
    1045                 while (strcmp(cur->sibling->name, xml->name)) 
     1045                while (cur->sibling && strcmp(cur->sibling->name, xml->name)) 
    10461046                    cur = cur->sibling; 
    10471047                if (cur->sibling == xml) { // first of a sibling list 
    10481048                    cur->sibling = (xml->next) ? xml->next 
    ezxml_t ezxml_cut(ezxml_t xml) 
    10511051                else cur = cur->sibling; // not first of a sibling list 
    10521052            } 
    10531053 
    1054             while (cur->next && cur->next != xml) cur = cur->next; 
    1055             if (cur->next) cur->next = cur->next->next; // patch next list 
     1054            cur = xml->parent->child; // go back to head of subtag list 
     1055            while (cur && cur->next != xml) cur = cur->ordered; 
     1056            if (cur && cur->next) cur->next = cur->next->next; // patch next list 
    10561057        }         
    10571058    } 
    10581059    xml->ordered = xml->sibling = xml->next = NULL; 
Note: See TracBrowser for help on using the repository browser.