bcvery1 / tilepix

Library for combining tiled maps with pixel
MIT License
46 stars 14 forks source link

Maps created with older versions of Tiled may crash #90

Closed svera closed 5 years ago

svera commented 5 years ago

Maps created with older versions of Tiled may crash applications using tilepix, as some of the required file attributes may be missing or have changed. Check attached example map, that will crash application with a division by zero error when loaded due to missing columns attribute in tileset element.

bcvery1 commented 5 years ago

Thanks for spotting this @svera - what version did you create the attached map with?

I suspect the 'fix' for this will be to simply specify a minimum supported version.

svera commented 5 years ago

@bcvery1 don't know, it was a map downloaded from the Internet.

I also would check if columns is 0 and return an error in that case.