Future-proof ADDR_INVALID checks by using strict [in]equality
This commit is contained in:
parent
56d03451ac
commit
c431e5dde8
3 changed files with 10 additions and 11 deletions
|
|
@ -982,7 +982,7 @@ X86Seg.prototype.updateMode = function(fLoad, fProt)
|
|||
* hardware does not update it either. In fact, I've seen code that uses the null GDT descriptor
|
||||
* for other purposes, on the assumption that that descriptor is completely unused.
|
||||
*/
|
||||
if ((this.sel & ~X86.SEL.RPL) && this.addrDesc != X86.ADDR_INVALID) {
|
||||
if ((this.sel & ~X86.SEL.RPL) && this.addrDesc !== X86.ADDR_INVALID) {
|
||||
var addrACC = this.addrDesc + X86.DESC.ACC.TYPE.OFFSET;
|
||||
this.cpu.setByte(addrACC, this.cpu.getByte(addrACC) | (X86.DESC.ACC.TYPE.ACCESSED >> 8));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue