From: Alex Henrie <alexhenrie24@gmail.com> MOVEABLE matters in LoadResource because it causes the least significant bit of the returned resource handle to be a 0 instead of a 1, and the game Odell Down Under evidently masks off the lowest bit before calling FreeResource. If the handle does not match exactly, FreeResource16 will not find it in the resource table, and will proceed to call GlobalFree16 even if the resource's reference count is not zero. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=26040 --- dlls/krnl386.exe16/resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/krnl386.exe16/resource.c b/dlls/krnl386.exe16/resource.c index ec6440d6a66..bcdb01a3b30 100644 --- a/dlls/krnl386.exe16/resource.c +++ b/dlls/krnl386.exe16/resource.c @@ -875,7 +875,7 @@ HGLOBAL16 WINAPI AllocResource16( HMODULE16 hModule, HRSRC16 hRsrc, DWORD size) pNameInfo = (NE_NAMEINFO*)((char*)pModule + hRsrc); if (size < (DWORD)pNameInfo->length << sizeShift) size = (DWORD)pNameInfo->length << sizeShift; - ret = GlobalAlloc16( GMEM_FIXED, size ); + ret = GlobalAlloc16( pNameInfo->flags & NE_SEGFLAGS_MOVEABLE ? GMEM_MOVEABLE : GMEM_FIXED, size ); if (ret) FarSetOwner16( ret, hModule ); return ret; } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11669