From 490eacf86e1064ca1dca8a6853ec6ef5d353f1a1 Mon Sep 17 00:00:00 2001 From: Emerald Lockdown <86802223+EmeraldLoc@users.noreply.github.com> Date: Sun, 11 Jun 2023 16:35:41 -0500 Subject: [PATCH] Fix lua packet's index always being 0 (#405) --- src/pc/network/packets/packet_lua_custom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pc/network/packets/packet_lua_custom.c b/src/pc/network/packets/packet_lua_custom.c index 61852494..ef392d87 100644 --- a/src/pc/network/packets/packet_lua_custom.c +++ b/src/pc/network/packets/packet_lua_custom.c @@ -26,7 +26,7 @@ void network_send_lua_custom(bool broadcast) { // get local index s32 toLocalIndex = 0; if (!broadcast) { - s32 toLocalIndex = smlua_to_integer(L, paramIndex++); + toLocalIndex = smlua_to_integer(L, paramIndex++); if (toLocalIndex <= 0 || toLocalIndex >= MAX_PLAYERS) { LOG_LUA_LINE("Tried to send packet to invalid local index: %d", toLocalIndex) return;