OSDN Git Service

[VM][i386] Fix wrong privilage checking on i386_protected_mode_jump().
authorK.Ohta <whatisthis.sowhat@gmail.com>
Mon, 27 Jan 2020 18:45:48 +0000 (03:45 +0900)
committerK.Ohta <whatisthis.sowhat@gmail.com>
Mon, 27 Jan 2020 18:45:48 +0000 (03:45 +0900)
source/src/vm/mame/emu/cpu/i386/i386.c

index 46b5b92..f81c23f 100644 (file)
@@ -1539,7 +1539,7 @@ static void __FASTCALL i386_protected_mode_jump(i386_state *cpustate, UINT16 seg
                if((desc.flags & 0x0004) == 0)
                {
                        /* non-conforming */
-                       if(RPL < CPL)
+                       if(RPL > CPL)
                        {
                                logerror("JMP: RPL %i is less than CPL %i\n",RPL,CPL);
                                FAULT(FAULT_GP,segment & 0xfffc)
@@ -1553,7 +1553,7 @@ static void __FASTCALL i386_protected_mode_jump(i386_state *cpustate, UINT16 seg
                else
                {
                        /* conforming */
-                       if(DPL < CPL)
+                       if(DPL > CPL)
                        {
                                logerror("JMP: DPL %i is less than CPL %i\n",DPL,CPL);
                                FAULT(FAULT_GP,segment & 0xfffc)