diff options
-rw-r--r-- | engines/hugo/file_v2d.cpp | 8 |
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 |