diff options
author | 2011-04-10 08:37:18 +0000 | |
---|---|---|
committer | 2011-04-10 08:37:18 +0000 | |
commit | d3049dfe830f7951be222483eec231ea1792c60c (patch) | |
tree | 838f8465eaa951e29c78c607235bea1141a2eb99 /src/emu/cpu/i86/instr286.c | |
parent | 92d885fa635a849293b043f851a41a52d6ff0c81 (diff) |
i286 - Fixed protected mode boundary check [Miodrag Milanovic]
Diffstat (limited to 'src/emu/cpu/i86/instr286.c')
-rw-r--r-- | src/emu/cpu/i86/instr286.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/emu/cpu/i86/instr286.c b/src/emu/cpu/i86/instr286.c index e78e80f86fd..6765995d15c 100644 --- a/src/emu/cpu/i86/instr286.c +++ b/src/emu/cpu/i86/instr286.c @@ -335,7 +335,7 @@ static void i80286_check_permission(i8086_state *cpustate, UINT8 check_seg, UINT throw GENERAL_PROTECTION_FAULT; /* Would we go past the segment boundary? */ - if ( offset + size > cpustate->limit[check_seg] ) + if ( (offset + (size-1)) > cpustate->limit[check_seg] ) { throw GENERAL_PROTECTION_FAULT; } |