aboutsummaryrefslogtreecommitdiff
path: root/engines/glk/alan3/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/glk/alan3/main.cpp')
-rw-r--r--engines/glk/alan3/main.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/glk/alan3/main.cpp b/engines/glk/alan3/main.cpp
index 64f701934f..06e5895dcc 100644
--- a/engines/glk/alan3/main.cpp
+++ b/engines/glk/alan3/main.cpp
@@ -135,8 +135,12 @@ static int crcStart(char version[4]) {
/*----------------------------------------------------------------------*/
static void readTemporaryHeader(ACodeHeader *tmphdr) {
codfil->seek(0);
- codfil->read(tmphdr, sizeof(*tmphdr));
- codfil->seek(0);
+ codfil->read(&tmphdr->tag[0], 4);
+
+ Aword *ptr = (Aword *)tmphdr + 1;
+ uint i;
+ for (i = 1; i < sizeof(ACodeHeader) / sizeof(Aword); ++i, ++ptr)
+ *ptr = codfil->readUint32BE();
if (strncmp((char *)tmphdr, "ALAN", 4) != 0)
playererr("Not an Alan game file, does not start with \"ALAN\"");
@@ -365,10 +369,6 @@ static void load(void) {
checkVersion(&tmphdr);
/* Allocate and load memory */
-
- if (littleEndian())
- reverseHdr(&tmphdr);
-
if (tmphdr.size <= sizeof(ACodeHeader) / sizeof(Aword))
syserr("Malformed game file. Too small.");