Fix gfx patching on 32-bit platforms (#2213)

This commit is contained in:
GaryOderNichts
2022-12-20 20:19:25 +01:00
committed by GitHub
parent 56ac27b8f4
commit 0f3c2d7c78

View File

@@ -867,6 +867,11 @@ extern "C" void ResourceMgr_PatchGfxByName(const char* path, const char* patchNa
}
}*/
// Index refers to individual gfx words, which are half the size on 32-bit
if (sizeof(uintptr_t) < 8) {
index /= 2;
}
Gfx* gfx = (Gfx*)&res->instructions[index];
if (!originalGfx.contains(path) || !originalGfx[path].contains(patchName)) {