summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Orlenko <zxteam@protonmail.com>2021-12-23 17:53:20 +0000
committerAlex Orlenko <zxteam@protonmail.com>2021-12-23 17:53:20 +0000
commit66c9c633b21987c527310b54dcd767cef65b8753 (patch)
tree8eda5a0b5af6a66e380fae090fd046f8d7562485 /src
parentf1e357ce52bce0bca1c39db37e3be62d09e48436 (diff)
downloadmlua-66c9c633b21987c527310b54dcd767cef65b8753.zip
Generate traceback from level 0 (instead of 1)
Fixes #112
Diffstat (limited to 'src')
-rw-r--r--src/util.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.rs b/src/util.rs
index 888df31..22eb6fe 100644
--- a/src/util.rs
+++ b/src/util.rs
@@ -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);
}
}