From: ShadowNinja Date: Thu, 20 Nov 2014 19:57:40 +0000 (-0500) Subject: Fix leaking global in texture pack menu X-Git-Tag: 0.4.11~156 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d2b5ba83b00ce00ff34f627da02f4eb4ceb86412;p=oweals%2Fminetest.git Fix leaking global in texture pack menu --- diff --git a/builtin/mainmenu/tab_texturepacks.lua b/builtin/mainmenu/tab_texturepacks.lua index 784480415..97f96fb1b 100644 --- a/builtin/mainmenu/tab_texturepacks.lua +++ b/builtin/mainmenu/tab_texturepacks.lua @@ -17,10 +17,10 @@ -------------------------------------------------------------------------------- local function filter_texture_pack_list(list) - retval = {"None"} - for _,i in ipairs(list) do - if i~="base" then - table.insert(retval, i) + local retval = {"None"} + for _, item in ipairs(list) do + if item ~= "base" then + table.insert(retval, item) end end return retval