Save and restore call counter for calls, since they may fail and leave elements on the stack when an Exception is thrown.

This commit is contained in:
James Roseborough
2009-04-10 00:35:23 +00:00
parent 4d4df03dbf
commit a159a50cee

View File

@@ -313,6 +313,7 @@ public class LuaState extends Lua {
// save stack state
int oldbase = base;
int oldcc = cc;
try {
// rb is base of new call frame
@@ -341,6 +342,7 @@ public class LuaState extends Lua {
} finally {
this.base = oldbase;
this.cc = oldcc;
}
}