changeset 185:68e6d3faeee6

Don’t reinitialize variables when another sub is called.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Wed, 26 Oct 2011 03:03:39 -0700
parents 54eb6b254b7b
children 84da28ae7ee4
files pytouhou/vm/eclrunner.py
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/pytouhou/vm/eclrunner.py
+++ b/pytouhou/vm/eclrunner.py
@@ -439,9 +439,8 @@ class ECLRunner(object):
         self.sub = sub
         self.frame = 0
         self.instruction_pointer = 0
-        self.variables = [param1, 0,  0,  0,
-                          param2, 0., 0., 0.,
-                          0,      0,  0,  0]
+        self.variables[0] = param1
+        self.variables[1] = param2
 
 
     @instruction(36)