Skip to content

Commit

Permalink
config: fixed evaluation in wrong order.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmayerguerr committed Mar 29, 2024
1 parent b2cd40b commit 1dd8383
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions source/config/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ Bool Config::hasName(const std::string &name)
return TRUE;
}

if(!stack.top().xmlNode->findChild(name))
return FALSE;

// local variables before?
// -----------------------
XmlNodePtr xmlNode;
Expand All @@ -158,8 +161,6 @@ Bool Config::hasName(const std::string &name)
break;
// unknown element: move to end
stack.top().xmlNode->addChild(xmlNode);
if(!stack.top().xmlNode->findChild(name))
return FALSE;
}

if(xmlNode == nullptr)
Expand Down

0 comments on commit 1dd8383

Please sign in to comment.