diff --git a/kyra/resource.cpp b/kyra/resource.cpp index 9e6afd80b82..00b2ede1843 100644 --- a/kyra/resource.cpp +++ b/kyra/resource.cpp @@ -199,7 +199,7 @@ namespace Kyra { // works with the file uint32 pos = 0, startoffset = 0, endoffset = 0; - startoffset = *(reinterpret_cast((_buffer + pos))); + startoffset = READ_LE_UINT32(_buffer + pos); pos += 4; while (pos < filesize) { @@ -212,7 +212,7 @@ namespace Kyra { if(!chunk->_name) break; - endoffset = *(reinterpret_cast((_buffer + pos))); + endoffset = READ_LE_UINT32(_buffer + pos); pos += 4; chunk->_data = _buffer + startoffset;