From dd91c09a710ca9caa103732878825c6ecbd97a65 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 26 Oct 2014 14:34:37 +0100 Subject: TOOLS/lua/autoload: don't shadow local variable "dir" is already used somewhere above. This was ok, but not nice. --- TOOLS/lua/autoload.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'TOOLS') diff --git a/TOOLS/lua/autoload.lua b/TOOLS/lua/autoload.lua index f6e9313f9a..ebea903a18 100644 --- a/TOOLS/lua/autoload.lua +++ b/TOOLS/lua/autoload.lua @@ -40,10 +40,10 @@ function find_and_add_entries() return end local append = {[-1] = {}, [1] = {}} - for dir = -1, 1, 2 do -- 2 iterations, with dir = -1 and +1 + for direction = -1, 1, 2 do -- 2 iterations, with direction = -1 and +1 for i = 1, MAXENTRIES do - local file = files[current + i * dir] - local pl_e = pl[pl_current + i * dir] + local file = files[current + i * direction] + local pl_e = pl[pl_current + i * direction] if file == nil or file[1] == "." then break end @@ -53,7 +53,7 @@ function find_and_add_entries() break end end - if dir == -1 then + if direction == -1 then if pl_current == 1 then -- never add additional entries in the middle mp.msg.info("Prepending " .. file) table.insert(append[-1], 1, file) -- cgit v1.2.3