Fix issue by loading the string buffer into a variable instead of using it directly.

This commit is contained in:
/dev/urandom 2016-09-17 23:10:48 +02:00
parent cce87be09a
commit 4ebfd55d3d
No known key found for this signature in database
GPG Key ID: 41322B973E0F295E

View File

@ -34,8 +34,10 @@ namespace Assets
return;
}
const Game::GfxImageFileHeader* iwiHeader = reinterpret_cast<const Game::GfxImageFileHeader*>(iwi.GetBuffer().data());
auto iwiBuffer = iwi.GetBuffer();
const Game::GfxImageFileHeader* iwiHeader = reinterpret_cast<const Game::GfxImageFileHeader*>(iwiBuffer.data());
image->mapType = 3;
image->dataLen1 = iwiHeader->fileSizeForPicmip[0] - 32;
image->dataLen2 = iwiHeader->fileSizeForPicmip[0] - 32;