From ef4d52954487a6d7da04b0cd14b8d2af9a4da095 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sun, 16 Oct 2016 12:23:24 -0400 Subject: [PATCH] Pass actual selector (without shifting) so we deinit the segment correctly. --- lx_loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lx_loader.c b/lx_loader.c index fc5ee5e..debfc73 100644 --- a/lx_loader.c +++ b/lx_loader.c @@ -325,7 +325,7 @@ static uint16 initOs2Tib(void *_topOfStack, const size_t stacklen, const uint32 // Wine does it. I still don't know why. const unsigned int segment = (entry.entry_number << 3) | 3; __asm__ __volatile__ ( "movw %%ax, %%fs \n\t" : : "a" (segment) ); - return (uint16) segment; + return (uint16) entry.entry_number; } // initOs2Tib static void deinitOs2Tib(const uint16 selector)