Skip to content

Commit b2fc82c

Browse files
committedFeb 9, 2025·
fix issue #918 (introduced in #885)
1 parent 57c5db5 commit b2fc82c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed
 

‎src/xml_parsing.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -548,8 +548,13 @@ void VerifyXML(const std::string& xml_text,
548548
for(auto child = node->FirstChildElement(); child != nullptr;
549549
child = child->NextSiblingElement())
550550
{
551-
const std::string child_name = node->FirstChildElement()->Name();
551+
const std::string child_name = child->Name();
552552
const auto child_search = registered_nodes.find(child_name);
553+
if(child_search == registered_nodes.end())
554+
{
555+
ThrowError(child->GetLineNum(),
556+
std::string("Unknown node type: ") + child_name);
557+
}
553558
const auto child_type = child_search->second;
554559
if(child_type == NodeType::CONTROL &&
555560
((child_name == "ThreadedAction") ||

0 commit comments

Comments
 (0)
Please sign in to comment.