Skip to content

Commit

Permalink
Fixed off by one mentioned in #216
Browse files Browse the repository at this point in the history
  • Loading branch information
torch2424 committed Feb 21, 2019
1 parent b8743d5 commit 94741ec
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions demo/benchmark/loadrom.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,8 @@ export default class LoadROMSelector extends Component {
// Clear Wasm memory
// https://docs.google.com/spreadsheets/d/17xrEzJk5-sCB9J2mMJcVnzhbE-XH_NvczVSQH9OHvRk/edit?usp=sharing
coreObjects.forEach(coreObject => {
for (let i = 0; i <= coreObject.core.byteMemory.length; i++) {
coreObject.core.byteMemory[i] = 0;
}
// Reset the byte memory to zero at all indexes
coreObject.core.byteMemory.fill(0);

// Set the ROM in byte memory
coreObject.core.byteMemory.set(ROMObject.ROM, coreObject.core.instance.exports.CARTRIDGE_ROM_LOCATION);
Expand Down

0 comments on commit 94741ec

Please sign in to comment.