aboutsummaryrefslogtreecommitdiffgithub
path: root/novice/simulator/cli-debugger.ts
diff options
context:
space:
mode:
Diffstat (limited to 'novice/simulator/cli-debugger.ts')
-rw-r--r--novice/simulator/cli-debugger.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/novice/simulator/cli-debugger.ts b/novice/simulator/cli-debugger.ts
index 6a8e8d5..b40d517 100644
--- a/novice/simulator/cli-debugger.ts
+++ b/novice/simulator/cli-debugger.ts
@@ -178,10 +178,10 @@ class CliDebugger extends Debugger {
/\d+/.test(operand) ? 10 : -1;
let addr: number;
if (base === -1) {
- if (!(operand in this.symbTable)) {
+ if (!this.hasSymbol(operand)) {
throw new Error(`unknown label \`${operand}'`);
}
- addr = this.symbTable[operand];
+ addr = this.getSymbolAddr(operand);
} else {
addr = parseInt(operand, base);
}