summaryrefslogtreecommitdiffstats
path: root/solutions/py/intcode.py
diff options
context:
space:
mode:
Diffstat (limited to 'solutions/py/intcode.py')
-rw-r--r--solutions/py/intcode.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/solutions/py/intcode.py b/solutions/py/intcode.py
index e9ef90c..d267d63 100644
--- a/solutions/py/intcode.py
+++ b/solutions/py/intcode.py
@@ -93,11 +93,10 @@ class Computer(object):
self.SIG_INPUT = False
self.pointer += 2
elif inst[0] == OUT:
- if self.output is not None:
- self.SIG_OUTPUT = True
+ if self.SIG_OUTPUT:
return
self.output = self.get_param(inst, 1)
- self.SIG_OUTPUT = False
+ self.SIG_OUTPUT = True
self.pointer += 2
elif inst[0] == JNZ:
if self.get_param(inst, 1) != 0: