From a45f91c512d9205cd7e14aa34570aad30293c89a Mon Sep 17 00:00:00 2001 From: PICCORO Lenz McKAY Date: Sun, 13 Mar 2022 15:44:00 -0400 Subject: [PATCH] better fix for check nil * close https://notabug.org/TenPlus1/mobs_redo/issues/114 * close https://codeberg.org/minenux/minetest-mod-mobs_redo/issues/107 --- api.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api.lua b/api.lua index d73796c..7659fac 100644 --- a/api.lua +++ b/api.lua @@ -270,6 +270,8 @@ local check_for = function(look_for, look_inside) for _, str in pairs(look_inside) do + if not str then goto continue end + if str == look_for then return true end @@ -282,6 +284,8 @@ local check_for = function(look_for, look_inside) return true end end + + ::continue:: end end