anno-mods / FileDBReader

A command line tool for working with a proprietary bluebyte file compression used in Anno 2205 and 1800.
15 stars 4 forks source link

Make sure empty attribs are recognized as such #34

Closed Shad0wlife closed 1 year ago

Shad0wlife commented 1 year ago

When turning an string or file to an XmlDocument, empty, non-selfclosing tags may have no children, but are an XmlElement that has the property IsEmpty set to false (would be true on self-closing elements). This scenario was previously not respected, making empty attribs be read as Tags and then causing deserialization to fail.

Added unit test "DeSerializeEmptyPrimitiveArray" to verify result.

taubenangriff commented 1 year ago

💯