mirror of
https://github.com/holub/mame
synced 2025-05-12 00:58:53 +03:00
i286 - Fixed protected mode boundary check [Miodrag Milanovic]
This commit is contained in:
parent
92d885fa63
commit
d3049dfe83
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user