[Scummvm-cvs-logs] scummvm master -> eaf6e5d4f8848f87835b368dd9f8f31cb14a705c

m-kiewitz m_kiewitz at users.sourceforge.net
Fri Feb 12 20:30:24 CET 2016


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:
eaf6e5d4f8 SCI: Fix fallback detector crashing on BE regress.


Commit: eaf6e5d4f8848f87835b368dd9f8f31cb14a705c
    https://github.com/scummvm/scummvm/commit/eaf6e5d4f8848f87835b368dd9f8f31cb14a705c
Author: Martin Kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2016-02-12T20:30:43+01:00

Commit Message:
SCI: Fix fallback detector crashing on BE regress.

Regression from af3fec8c26d92005b507dca65d1d50f820feb0e7
Code resulted in a crash on BE platforms

Changed paths:
    engines/sci/resource.cpp



diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp
index 54ef4b3..f357812 100644
--- a/engines/sci/resource.cpp
+++ b/engines/sci/resource.cpp
@@ -2679,7 +2679,9 @@ Common::String ResourceManager::findSierraGameId() {
 		return "";
 
 	// Seek to the name selector of the first export
-	byte *seeker = heap->data + READ_UINT16(heap->data + gameObjectOffset + nameSelector * 2);
+	byte *offsetPtr = heap->data + gameObjectOffset + nameSelector * 2;
+	uint16 offset = !isSci11Mac() ? READ_LE_UINT16(offsetPtr) : READ_BE_UINT16(offsetPtr);
+	byte *seeker = heap->data + offset;
 	Common::String sierraId;
 	sierraId += (const char *)seeker;
 






More information about the Scummvm-git-logs mailing list