Generate traceback from level 0 (instead of 1)

Fixes #112
This commit is contained in:
Alex Orlenko 2021-12-23 17:53:20 +00:00
parent f1e357ce52
commit 66c9c633b2
No known key found for this signature in database
GPG Key ID: 4C150C250863B96D
1 changed files with 1 additions and 1 deletions

View File

@ -585,7 +585,7 @@ pub unsafe extern "C" fn error_traceback(state: *mut ffi::lua_State) -> c_int {
if get_gc_userdata::<WrappedFailure>(state, -1).is_null() {
let s = ffi::luaL_tolstring(state, -1, ptr::null_mut());
if ffi::lua_checkstack(state, ffi::LUA_TRACEBACK_STACK) != 0 {
ffi::luaL_traceback(state, state, s, 1);
ffi::luaL_traceback(state, state, s, 0);
ffi::lua_remove(state, -2);
}
}