Skip to content

Commit

Permalink
don't attempt to draw the register if it doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
Maurits van Riezen committed Apr 12, 2024
1 parent 5a1a172 commit da202e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scripts/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ function update_ui_for_program(o: AnyTypeProgramState) {
stack_div.innerText = o.stacks.map(i => i.contents.map(j => o.number_implementation.toString(j)).join(' ')).join('\n');

cursor_postion_box.textContent = JSON.stringify(o.cursor);
register_box.textContent = o.stacks.map(i => o.number_implementation.toString(i.register)).join(', ');
register_box.textContent = o.stacks.map(i => i.register && o.number_implementation.toString(i.register)).join(', ');
}

let program_state: AnyTypeProgramState = {
Expand Down

0 comments on commit da202e4

Please sign in to comment.