[Scummvm-git-logs] scummvm branch-2-9 -> 08b2d938f997bc747990124aae1ecfb4dfad8a4f

dwatteau noreply at scummvm.org
Tue Nov 26 13:18:29 UTC 2024


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:
08b2d938f9 M4: Fix mem_get_from_stash() causing black screen regression on big-endian hosts (Trac#15513)


Commit: 08b2d938f997bc747990124aae1ecfb4dfad8a4f
    https://github.com/scummvm/scummvm/commit/08b2d938f997bc747990124aae1ecfb4dfad8a4f
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2024-11-26T14:18:18+01:00

Commit Message:
M4: Fix mem_get_from_stash() causing black screen regression on big-endian hosts (Trac#15513)

This fix is required on big-endian hosts, after the changes introduced in
commit 39f0c165c30118919ba082372acdd18ea72f2b3d.

Issue reported by BeWorld2018, fix suggested by ccawley2011, tested by
myself, and OK'd by dreammaster.

(cherry picked from commit 26c13427cc6042a120c408148f550478b8682ac8)

Changed paths:
    engines/m4/mem/mem.cpp


diff --git a/engines/m4/mem/mem.cpp b/engines/m4/mem/mem.cpp
index cca1fa6c14a..16d624a41b7 100644
--- a/engines/m4/mem/mem.cpp
+++ b/engines/m4/mem/mem.cpp
@@ -95,7 +95,7 @@ void *mem_get_from_stash(int32 memType, const Common::String &name) {
 
 	for (i = 0; i < _G(requests)[memType]; i++) {
 		if (!*b_ptr) {
-			*(uintptr *)b_ptr = 1;
+			*(uintptr *)b_ptr = FROM_LE_32(1);
 			void *result = (void *)(b_ptr + sizeof(uintptr));
 			Common::fill((byte *)result, (byte *)result + _G(sizeMem)[memType], 0);
 			return result;




More information about the Scummvm-git-logs mailing list