From 1414c99aa206b4db283762ffc34cacbedeada391 Mon Sep 17 00:00:00 2001 From: Jeff Parsons Date: Sat, 27 Jun 2015 11:33:22 -0700 Subject: [PATCH] getCycles() should never return a negative number (and OR'ing with zero can do just that) --- modules/pcjs/lib/cpu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/pcjs/lib/cpu.js b/modules/pcjs/lib/cpu.js index f03a3d9d3..628b2354c 100644 --- a/modules/pcjs/lib/cpu.js +++ b/modules/pcjs/lib/cpu.js @@ -690,7 +690,7 @@ CPU.prototype.calcCycles = function(fRecalc) */ CPU.prototype.getCycles = function(fScaled) { - var nCycles = (this.nTotalCycles + this.nRunCycles + this.nBurstCycles - this.nStepCycles)|0; + var nCycles = this.nTotalCycles + this.nRunCycles + this.nBurstCycles - this.nStepCycles; if (fScaled && this.aCounts.nCyclesMultiplier > 1 && this.aCounts.mhz > this.aCounts.mhzDefault) { /* * We could scale the current cycle count by the current effective speed (this.aCounts.mhz); eg: