logging - Fix bad alignment on rows with just one entry

This commit is contained in:
n loewen 2023-08-29 11:51:00 -04:00
parent d9212ab620
commit b776951e81
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ const logMemory = (mem, start=0, end=mem.length) => {
for (let i = start; i < mem.length; i +=2) {
let operand = mem[i+1];
if (typeof operand === 'undefined') {
console.log(` ${num2hex(i)} ${num2hex(i+1)}${num2hex(mem[i])} │ │`);
console.log(` ${num2hex(i)} ${num2hex(i+1)} ${num2hex(mem[i])} `);
} else {
console.log(`${num2hex(i)} ${num2hex(i+1)}${num2hex(mem[i])}${num2hex(operand)}`);
}