getCycles() should never return a negative number (and OR'ing with zero can do just that)

This commit is contained in:
Jeff Parsons 2015-06-27 11:33:22 -07:00
commit 1414c99aa2

View file

@ -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: