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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user