From 3f9b6507f06d1adc6235ef87bf3ca60aa9720b6f Mon Sep 17 00:00:00 2001 From: Joyless <65855333+Joy-less@users.noreply.github.com> Date: Tue, 15 Aug 2023 13:54:55 +0100 Subject: [PATCH] Fix for #296 (prevent infinite loop) --- src/MoonSharp.Interpreter/Interop/LuaStateInterop/LuaBase.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/MoonSharp.Interpreter/Interop/LuaStateInterop/LuaBase.cs b/src/MoonSharp.Interpreter/Interop/LuaStateInterop/LuaBase.cs index e62ff92b..78419ebb 100644 --- a/src/MoonSharp.Interpreter/Interop/LuaStateInterop/LuaBase.cs +++ b/src/MoonSharp.Interpreter/Interop/LuaStateInterop/LuaBase.cs @@ -316,6 +316,7 @@ protected static void LuaCall(LuaState L, lua_Integer nargs, lua_Integer nresult while (copied < nresults) { L.Push(DynValue.Nil); + copied++; } } }