[Scummvm-git-logs] scummvm master -> 6a7b76e47c4a44cdba2d721aa501fac9a7bb2ffe
bluegr
noreply at scummvm.org
Wed Nov 27 06:04:26 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:
6a7b76e47c M4: Fix the memory stash code on big endian
Commit: 6a7b76e47c4a44cdba2d721aa501fac9a7bb2ffe
https://github.com/scummvm/scummvm/commit/6a7b76e47c4a44cdba2d721aa501fac9a7bb2ffe
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2024-11-27T08:04:23+02:00
Commit Message:
M4: Fix the memory stash code on big endian
Changed paths:
engines/m4/mem/mem.cpp
diff --git a/engines/m4/mem/mem.cpp b/engines/m4/mem/mem.cpp
index 16d624a41b7..cdce0ab0f06 100644
--- a/engines/m4/mem/mem.cpp
+++ b/engines/m4/mem/mem.cpp
@@ -86,7 +86,7 @@ void mem_free_to_stash(void *mem, int32 memType) {
error_show(FL, 'MSGF');
b_ptr += index * (_G(sizeMem)[memType] + sizeof(uintptr));
- *b_ptr = 0;
+ *(uintptr *)b_ptr = 0;
}
void *mem_get_from_stash(int32 memType, const Common::String &name) {
@@ -94,8 +94,8 @@ void *mem_get_from_stash(int32 memType, const Common::String &name) {
int8 *b_ptr = (int8 *)_G(memBlock)[memType];
for (i = 0; i < _G(requests)[memType]; i++) {
- if (!*b_ptr) {
- *(uintptr *)b_ptr = FROM_LE_32(1);
+ if (!*(uintptr *)b_ptr) {
+ *(uintptr *)b_ptr = 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