[Scummvm-cvs-logs] scummvm master -> 8651f9739f20c1a3cb70b8c060fa411de7b8b451

Strangerke arnaud.boutonne at gmail.com
Sat Apr 23 08:31:50 CEST 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
8651f9739f HUGO: Fix Endianness issue in H2 and H3 Dos


Commit: 8651f9739f20c1a3cb70b8c060fa411de7b8b451
    https://github.com/scummvm/scummvm/commit/8651f9739f20c1a3cb70b8c060fa411de7b8b451
Author: strangerke (arnaud.boutonne at gmail.com)
Date: 2011-04-22T23:31:04-07:00

Commit Message:
HUGO: Fix Endianness issue in H2 and H3 Dos

Changed paths:
    engines/hugo/file_v2d.cpp



diff --git a/engines/hugo/file_v2d.cpp b/engines/hugo/file_v2d.cpp
index ffadd17..d385157 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






More information about the Scummvm-git-logs mailing list