Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Debugger: Selector 0 or any selector type == 0 is not valid
  • Loading branch information
joncampbell123 committed Mar 13, 2018
1 parent 754db01 commit 1954621
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/debug/debug.cpp
Expand Up @@ -178,8 +178,10 @@ Bit64u LinMakeProt(Bit16u selector, Bit32u offset)
Descriptor desc;

if (cpu.gdt.GetDescriptor(selector,desc)) {
if (offset <= desc.GetLimit())
return desc.GetBase()+offset;
if (selector >= 8 && desc.Type() != 0) {
if (offset <= desc.GetLimit())
return desc.GetBase()+offset;
}
}

return mem_no_address;
Expand Down

0 comments on commit 1954621

Please sign in to comment.