From 3d81f09a6974389e5da0c366d13bd3128c1a7384 Mon Sep 17 00:00:00 2001 From: wixette Date: Sat, 7 Mar 2020 02:38:38 +0800 Subject: [PATCH] fix bug in readPort function --- js/sim8800.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/sim8800.js b/js/sim8800.js index ac25b68..a132884 100644 --- a/js/sim8800.js +++ b/js/sim8800.js @@ -249,8 +249,8 @@ class Sim8800 { return function(address) { var value = 0; // We only care about the port 0xff. - if (address == 0xff && this.getInputAddressCallback) { - var word = this.getInputAddressCallback(); + if (address == 0xff && self.getInputAddressCallback) { + var word = self.getInputAddressCallback(); return word >> 8; } return value;