ladislav-zezula / StormLib

Official GitHub repository of the StormLib library created by Ladislav Zezula (author)
http://www.zezula.net/mpq.html
MIT License
560 stars 213 forks source link

Assertion in CheckSizeOfAttributesFile fails #18

Closed Josko closed 10 years ago

Josko commented 10 years ago

Hello,

I tried to open an old map Escape Gay Space.w3x using the newest StormLib and it fails with:

aura++: /home/josko/projects/aura-bot/StormLib/src/SFileAttributes.cpp:129: DWORD CheckSizeOfAttributesFile(DWORD, DWORD, DWORD): Assertion `false' failed.
Aborted (core dumped)

It used to work with the old StormLib of 6.xx. I am unsure if it's caused by map protection or something else. The map can be found here:

http://www.epicwar.com/maps/2626/

ladislav-zezula commented 10 years ago

There is lots of MPQs out there with improper size of the (attributes) file in it. That's why the assert only throws when STORMLIB_TEST is defined (aka when I build the test suite for StormLib. Make sure you don't have STORMLIB_TEST when you are building the library.