[Scummvm-git-logs] scummvm master -> 26c13427cc6042a120c408148f550478b8682ac8

dwatteau noreply at scummvm.org
Tue Nov 26 13:14:56 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:
26c13427cc M4: Fix mem_get_from_stash() causing black screen regression on big-endian hosts (Trac#15513)


Commit: 26c13427cc6042a120c408148f550478b8682ac8
    https://github.com/scummvm/scummvm/commit/26c13427cc6042a120c408148f550478b8682ac8
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2024-11-26T14:13:40+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.

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