summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrediano Ziglio <fziglio@redhat.com>2015-07-21 17:45:39 +0100
committerChristophe Fergeau <cfergeau@redhat.com>2015-07-23 11:22:11 +0200
commit08384ac7fbdc8303fdf85cc2689602e429607126 (patch)
treec1f37fe51f8280183530c09ed74396d4784fbb29
parentf6506a25639a47cfdcef452202c1ee9233be3f36 (diff)
codegen: Check we don't pop too many indexes
-rw-r--r--python_modules/codegen.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/python_modules/codegen.py b/python_modules/codegen.py
index 02ffdb9..c470988 100644
--- a/python_modules/codegen.py
+++ b/python_modules/codegen.py
@@ -357,6 +357,7 @@ class CodeWriter:
return index
def push_index(self):
+ assert self.current_index > 0
self.current_index = self.current_index - 1
class Index: