aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstrangerke2011-04-23 08:31:04 +0200
committerstrangerke2011-04-23 08:31:04 +0200
commit8651f9739f20c1a3cb70b8c060fa411de7b8b451 (patch)
treec48fef01708675d499a07fc0e210daaeade69892
parente19fe1c53fb9433a188618d94cc8a3f5a15fd5d8 (diff)
downloadscummvm-rg350-8651f9739f20c1a3cb70b8c060fa411de7b8b451.tar.gz
scummvm-rg350-8651f9739f20c1a3cb70b8c060fa411de7b8b451.tar.bz2
scummvm-rg350-8651f9739f20c1a3cb70b8c060fa411de7b8b451.zip
HUGO: Fix Endianness issue in H2 and H3 Dos
-rw-r--r--engines/hugo/file_v2d.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/hugo/file_v2d.cpp b/engines/hugo/file_v2d.cpp
index ffadd17481..d385157a11 100644
--- a/engines/hugo/file_v2d.cpp
+++ b/engines/hugo/file_v2d.cpp
@@ -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