michaelrsweet / mxml

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

Maybe a bug in mxml-4.0.2/mxml-set.c line 552 ? #321

Closed lbinic closed 1 month ago

lbinic commented 1 month ago
     552 if (string == node->value.text.string)
     553 {
     554  node->value.text.whitespace = whitespace;
     555  return (true);
     556 }

This might be a bug. Maybe something like strcmp() was intended.

michaelrsweet commented 1 month ago

No, the check is to avoid freeing the same stored pointer...