Fix endian again
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include "asset/asset.h"
|
||||
#include "assert/assert.h"
|
||||
#include "map/mapchunk.h"
|
||||
#include "util/endian.h"
|
||||
|
||||
#pragma pack(push, 1)
|
||||
typedef struct {
|
||||
@@ -56,7 +57,7 @@ errorret_t assetMapChunkHandler(assetcustom_t custom) {
|
||||
}
|
||||
|
||||
// Fix endianess if necessary
|
||||
header.tileCount = le32toh(header.tileCount);
|
||||
header.tileCount = endianLittleToHost32(header.tileCount);
|
||||
|
||||
if(header.tileCount != CHUNK_TILE_COUNT) {
|
||||
zip_fclose(custom.zipFile);
|
||||
@@ -111,7 +112,7 @@ errorret_t assetMapChunkHandler(assetcustom_t custom) {
|
||||
}
|
||||
|
||||
// Fix endianess if necessary
|
||||
modelHeader.vertexCount = le32toh(modelHeader.vertexCount);
|
||||
modelHeader.vertexCount = endianLittleToHost32(modelHeader.vertexCount);
|
||||
|
||||
if(
|
||||
vertexIndex + modelHeader.vertexCount >
|
||||
|
||||
Reference in New Issue
Block a user