Fixed issue: #86
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -173,10 +173,16 @@ public class DebugLib extends TwoArgFunction {
|
||||
// find the stack info
|
||||
DebugLib.CallFrame frame;
|
||||
if ( func.isnumber() ) {
|
||||
frame = callstack.getCallFrame(func.toint());
|
||||
if (frame == null)
|
||||
return NONE;
|
||||
func = frame.f;
|
||||
int level = func.toint();
|
||||
if (level == 0) {
|
||||
frame = null;
|
||||
func = this;
|
||||
} else {
|
||||
frame = callstack.getCallFrame(level);
|
||||
if (frame == null)
|
||||
return NONE;
|
||||
func = frame.f;
|
||||
}
|
||||
} else if ( func.isfunction() ) {
|
||||
frame = callstack.findCallFrame(func);
|
||||
} else {
|
||||
@@ -453,12 +459,14 @@ public class DebugLib extends TwoArgFunction {
|
||||
if (s.inhook || s.hookfunc == null) return;
|
||||
s.inhook = true;
|
||||
try {
|
||||
callstack().onCall(s.hookfunc.checkfunction());
|
||||
s.hookfunc.call(type, arg);
|
||||
} catch (LuaError e) {
|
||||
throw e;
|
||||
} catch (RuntimeException e) {
|
||||
throw new LuaError(e);
|
||||
} finally {
|
||||
callstack().onReturn();
|
||||
s.inhook = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user