[Spice-devel,v2,09/43] codegen: Check we don't pop too much indexes

Submitted by Frediano Ziglio on July 8, 2015, 1:53 p.m.

Details

Message ID 1436363656-4266-10-git-send-email-fziglio@redhat.com
State Accepted
Commit f71727300287eef4cffdcee9ffb3d7b4b45ff732
Headers show

Not browsing as part of any series.

Commit Message

Frediano Ziglio July 8, 2015, 1:53 p.m.
---
 python_modules/codegen.py | 1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

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: