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
13
src/x86seg.c
13
src/x86seg.c
|
|
@ -2500,13 +2500,16 @@ void taskswitch286(uint16_t seg, uint16_t *segdat, int is32)
|
||||||
if (optype==OPTYPE_INT || optype==CALL)
|
if (optype==OPTYPE_INT || optype==CALL)
|
||||||
{
|
{
|
||||||
writememl(base,0,tr.seg);
|
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_cr3=readmeml(base,0x1C);
|
||||||
new_pc=readmeml(base,0x20);
|
new_pc=readmeml(base,0x20);
|
||||||
new_flags=readmeml(base,0x24);
|
new_flags=readmeml(base,0x24);
|
||||||
|
if (optype == OPTYPE_INT || optype == CALL)
|
||||||
|
new_flags |= NT_FLAG;
|
||||||
|
|
||||||
new_eax=readmeml(base,0x28);
|
new_eax=readmeml(base,0x28);
|
||||||
new_ecx=readmeml(base,0x2C);
|
new_ecx=readmeml(base,0x2C);
|
||||||
|
|
@ -2709,12 +2712,14 @@ void taskswitch286(uint16_t seg, uint16_t *segdat, int is32)
|
||||||
if (optype==OPTYPE_INT || optype==CALL)
|
if (optype==OPTYPE_INT || optype==CALL)
|
||||||
{
|
{
|
||||||
writememw(base,0,tr.seg);
|
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_pc=readmemw(base,0x0E);
|
||||||
new_flags=readmemw(base,0x10);
|
new_flags=readmemw(base,0x10);
|
||||||
|
if (optype == OPTYPE_INT || optype == CALL)
|
||||||
|
new_flags |= NT_FLAG;
|
||||||
|
|
||||||
new_eax=readmemw(base,0x12);
|
new_eax=readmemw(base,0x12);
|
||||||
new_ecx=readmemw(base,0x14);
|
new_ecx=readmemw(base,0x14);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue