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

Submitted by Frediano Ziglio on July 21, 2015, 4:45 p.m.

Details

Message ID 1437497181-26929-10-git-send-email-fziglio@redhat.com
State New
Headers show

Not browsing as part of any series.

Commit Message

Frediano Ziglio July 21, 2015, 4:45 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: