From ae2f98e017f32039ee31b1fbda581ee1ab828dfa Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Wed, 29 Nov 2023 14:12:46 -0800 Subject: [PATCH] Mingw: Update for GDT --- Source/Windows/WOW64/Module.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Windows/WOW64/Module.cpp b/Source/Windows/WOW64/Module.cpp index dc8a38376..fbeef9c6a 100644 --- a/Source/Windows/WOW64/Module.cpp +++ b/Source/Windows/WOW64/Module.cpp @@ -144,7 +144,8 @@ namespace Context { State.gs_idx = Context->SegGs & 0xffff; // The TEB is the only populated GDT entry by default - State.gdt[(Context->SegFs & 0xffff) >> 3].base = WowTEB; + State.SetGDTBase(&State.gdt[(Context->SegFs & 0xffff) >> 3], WowTEB); + State.SetGDTLimit(&State.gdt[(Context->SegFs & 0xffff) >> 3], 0xF'FFFFU); State.fs_cached = WowTEB; State.es_cached = 0; State.cs_cached = 0;