1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-18 04:23:20 +01:00

x64: Fix game_command_modify_groups

This commit is contained in:
Ted John
2016-09-10 18:35:12 +01:00
parent 653c77c9da
commit ef7cd793a4

View File

@@ -2164,9 +2164,9 @@ void game_command_modify_groups(int *eax, int *ebx, int *ecx, int *edx, int *esi
nameChunkOffset = 2;
nameChunkOffset *= 12;
nameChunkOffset = (std::min)(nameChunkOffset, Util::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;