Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(scripting/lua): zero out 3 arguments, not 2
Some result types will expect 3 results.
  • Loading branch information
blattersturm committed Jun 14, 2021
1 parent 16491b6 commit 14dfa78
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -1435,11 +1435,12 @@ int SAFE_BUFFERS Lua_InvokeNative(lua_State* L)
#ifndef IS_FXSERVER
if constexpr (IsPtr)
{
// zero out two following arguments
if (context.numArguments <= 30)
// zero out three following arguments
if (context.numArguments <= 29)
{
context.arguments[context.numArguments + 0] = 0;
context.arguments[context.numArguments + 1] = 0;
context.arguments[context.numArguments + 2] = 0;
}

auto handler = hash;
Expand Down

0 comments on commit 14dfa78

Please sign in to comment.