Fix access to undefined variable in x86 task switch code.
This commit is contained in:
parent
904ac54446
commit
b6b9aab6dc
1 changed files with 11 additions and 6 deletions
17
src/x86seg.c
17
src/x86seg.c
|
|
@ -2500,14 +2500,17 @@ void taskswitch286(uint16_t seg, uint16_t *segdat, int is32)
|
|||
if (optype==OPTYPE_INT || optype==CALL)
|
||||
{
|
||||
writememl(base,0,tr.seg);
|
||||
new_flags|=NT_FLAG;
|
||||
if (cpu_state.abrt)
|
||||
return;
|
||||
}
|
||||
if (cpu_state.abrt) return;
|
||||
|
||||
|
||||
new_cr3=readmeml(base,0x1C);
|
||||
new_pc=readmeml(base,0x20);
|
||||
new_flags=readmeml(base,0x24);
|
||||
|
||||
if (optype == OPTYPE_INT || optype == CALL)
|
||||
new_flags |= NT_FLAG;
|
||||
|
||||
new_eax=readmeml(base,0x28);
|
||||
new_ecx=readmeml(base,0x2C);
|
||||
new_edx=readmeml(base,0x30);
|
||||
|
|
@ -2709,13 +2712,15 @@ void taskswitch286(uint16_t seg, uint16_t *segdat, int is32)
|
|||
if (optype==OPTYPE_INT || optype==CALL)
|
||||
{
|
||||
writememw(base,0,tr.seg);
|
||||
new_flags|=NT_FLAG;
|
||||
if (cpu_state.abrt)
|
||||
return;
|
||||
}
|
||||
if (cpu_state.abrt) return;
|
||||
|
||||
new_pc=readmemw(base,0x0E);
|
||||
new_flags=readmemw(base,0x10);
|
||||
|
||||
if (optype == OPTYPE_INT || optype == CALL)
|
||||
new_flags |= NT_FLAG;
|
||||
|
||||
new_eax=readmemw(base,0x12);
|
||||
new_ecx=readmemw(base,0x14);
|
||||
new_edx=readmemw(base,0x16);
|
||||
|
|
|
|||
Loading…
Reference in a new issue