namreeb / namigator

An intelligent navigation API for World of Warcraft Alpha, Vanilla, TBC and WotLK
MIT License
49 stars 32 forks source link

MapBuilder crash when load MH2O #32

Closed oiramario closed 2 years ago

oiramario commented 2 years ago

MapBuilder crash when build data of Azeroth for WtoLK. https://github.com/namreeb/namigator/blob/master/parser/Adt/Chunks/MH2O.cpp#L42 instance.Width and instance.Height are both zero. It works fine for TBC because header.Mh2oOffset is always zero.

during researching I found the 0x14 offset cause this issue. https://github.com/namreeb/namigator/blob/master/parser/Adt/Adt.cpp#L98 building success after remove this 0x14 offset.

what's your suggestion?

namreeb commented 2 years ago

Your fix is probably right. But I'm leaving this open to remind me to include some testing data in the wrath format.

namreeb commented 2 years ago

I changed my mind. I fixed this issue and left myself a note with https://github.com/namreeb/namigator/issues/33. Thanks for the report!