&&, not ||

This commit is contained in:
copy 2013-11-07 19:16:58 +01:00
commit d046bb54c5
3 changed files with 4 additions and 4 deletions

2
.gitignore vendored
View file

@ -1,4 +1,4 @@
images/*
v86_all.js
cpu.js
src/cpu.js

View file

@ -5550,7 +5550,7 @@ function FPU(io)
case 2:
// fist
var st0 = get_st0();
if(st0 <= 0x7FFF || st0 >= -0x8000)
if(st0 <= 0x7FFF && st0 >= -0x8000)
{
safe_write16(addr, integer_round(st0));
}
@ -5563,7 +5563,7 @@ function FPU(io)
case 3:
// fistp
var st0 = get_st0();
if(st0 <= 0x7FFF || st0 >= -0x8000)
if(st0 <= 0x7FFF && st0 >= -0x8000)
{
safe_write16(addr, integer_round(st0));
}

View file

@ -1633,7 +1633,7 @@ function FPU(io)
// fistp
var st0 = integer_round(get_st0());
if(!(st0 <= 0x7FFFFFFFFFFFFFFF || st0 >= -0x8000000000000000))
if(!(st0 <= 0x7FFFFFFFFFFFFFFF && st0 >= -0x8000000000000000))
{
st0 = 0x8000000000000000;
invalid_arithmatic();