Skip to content

Commit

Permalink
HUGO: Fix Endianness issue in H2 and H3 Dos
Browse files Browse the repository at this point in the history
  • Loading branch information
Strangerke committed Apr 23, 2011
1 parent e19fe1c commit 8651f97
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions engines/hugo/file_v2d.cpp
Expand Up @@ -167,10 +167,10 @@ const char *FileManager_v2d::fetchString(const int index) {

// Get offset to string[index] (and next for length calculation)
_stringArchive.seek((uint32)index * sizeof(uint32), SEEK_SET);
uint32 off1, off2;
if (_stringArchive.read((char *)&off1, sizeof(uint32)) == 0)
error("An error has occurred: bad String offset");
if (_stringArchive.read((char *)&off2, sizeof(uint32)) == 0)

uint32 off1 = _stringArchive.readUint32LE();
uint32 off2 = _stringArchive.readUint32LE();
if (!off1 || !off2)
error("An error has occurred: bad String offset");

// Check size of string
Expand Down

0 comments on commit 8651f97

Please sign in to comment.