Skip to content

Fix string length computation for O5M encoding

We need to consider the UTF-8 encoded string length here, which can differ from the QString length previously used. In most cases the difference isn't relevant, but I have encountered two tiles so far where those values not only differed, but ended up on either side of the 250 character limit here. If that happens the string table in the o5m decoder when reading this ends up in an inconsistent state, and produces spectacularly messed up tags.

While at it, also sharpen the asserts here, violating either of those would produce invalid o5m output.

Merge request reports