summaryrefslogtreecommitdiff
path: root/src/html/html_collection.c
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2012-07-07 19:48:21 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2012-07-07 19:48:21 +0100
commitaad88db50427116956662add8f827e2a1756884b (patch)
tree5708862e2c5f31b4d0a7b8e17afccdb2abbc91ff /src/html/html_collection.c
parent7984f00c4cce1d599da95a8c8cbbd912f33444b1 (diff)
downloadlibdom-aad88db50427116956662add8f827e2a1756884b.tar.gz
libdom-aad88db50427116956662add8f827e2a1756884b.tar.bz2
HTMLCollection: Fix node walker to not stop after left-tree of root
Diffstat (limited to 'src/html/html_collection.c')
-rw-r--r--src/html/html_collection.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/html/html_collection.c b/src/html/html_collection.c
index 7532742..7fe6d06 100644
--- a/src/html/html_collection.c
+++ b/src/html/html_collection.c
@@ -135,7 +135,7 @@ dom_exception dom_html_collection_get_length(dom_html_collection *col,
parent = parent->parent;
}
- if (parent == col->root)
+ if (node == col->root)
node = NULL;
else
node = node->next;
@@ -184,7 +184,7 @@ dom_exception dom_html_collection_item(dom_html_collection *col,
parent = parent->parent;
}
- if (parent == col->root)
+ if (n == col->root)
n = NULL;
else
n = n->next;