summaryrefslogtreecommitdiffstats
path: root/solutions/py/intcode.py
diff options
context:
space:
mode:
authorGustav Sörnäs <gusso230@student.liu.se>2019-12-17 18:55:21 +0100
committerGustav Sörnäs <gusso230@student.liu.se>2019-12-17 18:55:21 +0100
commitca4d3b189da7793ce8744246617c793c8640ce71 (patch)
tree087d23c41ebaa9b22c8211d95e7ce73d1294eb2f /solutions/py/intcode.py
parent189ca3de24bcaa5028767154af555c2194d019ab (diff)
downloadaoc-ca4d3b189da7793ce8744246617c793c8640ce71.tar.gz
Fix SIG_*-resets
Diffstat (limited to 'solutions/py/intcode.py')
-rw-r--r--solutions/py/intcode.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/solutions/py/intcode.py b/solutions/py/intcode.py
index daaf12d..694fee0 100644
--- a/solutions/py/intcode.py
+++ b/solutions/py/intcode.py
@@ -87,6 +87,8 @@ class Computer(object):
def step(self):
if self.SIG_OUTPUT and self.output is None:
self.SIG_OUTPUT = False
+ if self.SIG_INPUT and self.input is not None:
+ self.SIG_INPUT = False
inst = self.parse_op(self.memory[self.pointer])
if inst[0] == HAL: