summaryrefslogtreecommitdiff
path: root/src/thread.rs
diff options
context:
space:
mode:
authorkyren <kerriganw@gmail.com>2018-02-09 23:35:29 -0500
committerkyren <kerriganw@gmail.com>2018-02-09 23:40:23 -0500
commitd331e4b97c50db447d0f239636c171005421ea6f (patch)
tree5ed086a9641556b5e7ce376e65c546200a02fc97 /src/thread.rs
parentfe6e4bdf35fa6196b9f365cf0c0ed69ae2cdfd51 (diff)
downloadmlua-d331e4b97c50db447d0f239636c171005421ea6f.zip
Error correctly on too many arguments / returns / binds / recursions
There are also some other drive-by changes to fix panicking in extern "C" functions and other edge case stack errors
Diffstat (limited to 'src/thread.rs')
-rw-r--r--src/thread.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/thread.rs b/src/thread.rs
index 59ab2e7..1ab62b2 100644
--- a/src/thread.rs
+++ b/src/thread.rs
@@ -93,7 +93,7 @@ impl<'lua> Thread<'lua> {
let args = args.to_lua_multi(lua)?;
let nargs = args.len() as c_int;
- check_stack(thread_state, nargs);
+ check_stack_err(thread_state, nargs + 1)?;
for arg in args {
lua.push_value(thread_state, arg);