diff options
Diffstat (limited to 'src/resources/itemdb.cpp')
-rw-r--r-- | src/resources/itemdb.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp index f914af47..6e0ecce9 100644 --- a/src/resources/itemdb.cpp +++ b/src/resources/itemdb.cpp @@ -65,13 +65,13 @@ void ItemDB::load() logger->error("ItemDB: Error while parsing item database (items.xml)!");
}
- xmlNodePtr node = xmlDocGetRootElement(doc);
- if (!node || !xmlStrEqual(node->name, BAD_CAST "items"))
+ xmlNodePtr rootNode = xmlDocGetRootElement(doc);
+ if (!rootNode || !xmlStrEqual(rootNode->name, BAD_CAST "items"))
{
logger->error("ItemDB: items.xml is not a valid database file!");
}
- for (node = node->xmlChildrenNode; node != NULL; node = node->next)
+ for_each_xml_child_node(node, rootNode)
{
if (!xmlStrEqual(node->name, BAD_CAST "item")) {
continue;
|