Fixed mxmlSetDeclarationf implementation (Issue #322)

This commit is contained in:
Michael R Sweet 2024-04-21 16:58:53 -04:00
parent c81526ad84
commit 0c97db4186
No known key found for this signature in database
GPG Key ID: BE67C75EC81F3244
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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);