Skip to content

Commit

Permalink
Fixed mxmlSetDeclarationf implementation (Issue #322)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelrsweet committed Apr 21, 2024
1 parent c81526a commit 0c97db4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Changes in Mini-XML 4.0.3
set (Issue #325)
- Now install the man page as "mxml4" to allow parallel installation of Mini-XML
4.x and 3.x (Issue #324)
- Fixed `mxmlSetDeclarationf` implementation (Issue #322)


Changes in Mini-XML 4.0.2
Expand Down
4 changes: 2 additions & 2 deletions mxml-set.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,10 @@ mxmlSetDeclarationf(mxml_node_t *node, // I - Node


// Range check input...
if (node && node->type == MXML_TYPE_ELEMENT && node->child && node->child->type == MXML_TYPE_COMMENT)
if (node && node->type == MXML_TYPE_ELEMENT && node->child && node->child->type == MXML_TYPE_DECLARATION)
node = node->child;

if (!node || node->type != MXML_TYPE_COMMENT)
if (!node || node->type != MXML_TYPE_DECLARATION)
return (false);
else if (!format)
return (false);
Expand Down

0 comments on commit 0c97db4

Please sign in to comment.