michaelrsweet / mxml

Tiny XML library.
https://www.msweet.org/mxml
Apache License 2.0
426 stars 157 forks source link

Maybe a bug mxml-4.0.2/mxml-set.c lines 266 and 269 #322

Closed lbinic closed 3 weeks ago

lbinic commented 1 month ago
266   if (node && node->type == MXML_TYPE_ELEMENT && node->child && node->child->type == MXML_TYPE_COMMENT)
267   node = node->child;
268
269  if (!node || node->type != MXML_TYPE_COMMENT)

We are in mxmlSetDeclarationf(), so probably it is MXML_TYPE_DECLARATION instead of MXML_TYPE_COMMENT.

michaelrsweet commented 1 month ago

Whoops, yes that needs to be fixed.

michaelrsweet commented 3 weeks ago

[master 0c97db4] Fixed mxmlSetDeclarationf implementation (Issue #322)