Skip to content

Commit

Permalink
Merge pull request #24 from yaacov/fix-labels-degug
Browse files Browse the repository at this point in the history
debug labels in hex
  • Loading branch information
yaacov authored Oct 3, 2023
2 parents 4707d29 + 0a0e95c commit 6b1ea36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/debug.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function throwFormattedError(message, instruction, memoryLength) {
*/
export function dumpLabels(labels) {
Object.entries(labels).forEach(([address, label]) => {
console.log(`${label.padStart(8)}: 0x${address.toString(16).padStart(2, '0').toUpperCase()}`);
console.log(`${label.padStart(8)}: 0x${parseInt(address, 10).toString(16).padStart(2, '0').toUpperCase()}`);
});
}

Expand Down

0 comments on commit 6b1ea36

Please sign in to comment.