From 2ff681b1e9392ec45f85485b79465874c9eb6956 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 11 Apr 2005 20:03:12 +0000 Subject: Endian fixes svn-id: r17549 --- gob/map.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gob') diff --git a/gob/map.cpp b/gob/map.cpp index 84d4cdf236..63b6b176e4 100644 --- a/gob/map.cpp +++ b/gob/map.cpp @@ -601,6 +601,7 @@ void map_loadMapObjects(char *avjFile) { } map_loadDataFromAvo((char *)&gob_objCount, 2); + gob_objCount = FROM_LE_16(gob_objCount); for (i = 0; i < gob_objCount; i++) { gob_objects[i] = (Gob_Object *) malloc(sizeof(Gob_Object)); @@ -674,10 +675,11 @@ void map_loadMapObjects(char *avjFile) { gob_objects[10]->unk14 = 1; map_loadDataFromAvo((char *)&state, 2); + state = FROM_LE_16(state); for (i = 0; i < state; i++) { map_avoDataPtr += 30; - map_loadDataFromAvo((char *)&flag, 4); + map_loadDataFromAvo((char *)&flag, 4); // FIXME: Endian conversion needed? map_avoDataPtr += 56; if (flag != 0) -- cgit v1.2.3