From b38416426fb56f6ef40988a954939c942d74bda8 Mon Sep 17 00:00:00 2001 From: Ted John Date: Sun, 4 Sep 2016 15:51:52 +0100 Subject: [PATCH] x64: Fix game_command_set_banner_name --- src/world/map.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/world/map.c b/src/world/map.c index e362a5e72a..2ead3b974a 100644 --- a/src/world/map.c +++ b/src/world/map.c @@ -5259,9 +5259,9 @@ void game_command_set_banner_name(int* eax, int* ebx, int* ecx, int* edx, int* e nameChunkOffset = 2; nameChunkOffset *= 12; nameChunkOffset = min(nameChunkOffset, countof(newName) - 12); - RCT2_GLOBAL(newName + nameChunkOffset + 0, uint32) = *edx; - RCT2_GLOBAL(newName + nameChunkOffset + 4, uint32) = *ebp; - RCT2_GLOBAL(newName + nameChunkOffset + 8, uint32) = *edi; + memcpy((void*)((uintptr_t)newName + (uintptr_t)nameChunkOffset + 0), edx, sizeof(uint32)); + memcpy((void*)((uintptr_t)newName + (uintptr_t)nameChunkOffset + 4), ebp, sizeof(uint32)); + memcpy((void*)((uintptr_t)newName + (uintptr_t)nameChunkOffset + 8), edi, sizeof(uint32)); if (nameChunkIndex != 0) { *ebx = 0;