Permalink
Browse files

fix child method: off-by-one error: child(0) == child(1)

  • Loading branch information...
1 parent f4707b5 commit 1fa4f5d2265ebb5cd86efb4e1f785357a59b34c1 @triccardi-systran triccardi-systran committed Jul 18, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/xml_element.cc
View
2 src/xml_element.cc
@@ -340,7 +340,7 @@ XmlElement::get_child(int32_t idx) {
v8::HandleScope scope;
xmlNode* child = xml_obj->children;
- int32_t i = 1;
+ int32_t i = 0;
while (child && i < idx) {
child = child->next;
++i;

0 comments on commit 1fa4f5d

Please sign in to comment.