Skip to content

Commit

Permalink
Pass actual selector (without shifting) so we deinit the segment corr…
Browse files Browse the repository at this point in the history
…ectly.
  • Loading branch information
icculus committed Oct 16, 2016
1 parent d8f6285 commit ef4d529
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lx_loader.c
Expand Up @@ -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)
Expand Down

0 comments on commit ef4d529

Please sign in to comment.