aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/lib
diff options
context:
space:
mode:
authorDavid Walter Seikel2014-05-16 08:17:34 +1000
committerDavid Walter Seikel2014-05-16 08:17:34 +1000
commit21b381b129be99d6248fb27fdf4ca236e730224d (patch)
treefa6f429cf4075fdb64b88d114a3b8d906233a8a9 /lib
parentVarious ll*List2*() fixes. (diff)
downloadSledjHamr-21b381b129be99d6248fb27fdf4ca236e730224d.zip
SledjHamr-21b381b129be99d6248fb27fdf4ca236e730224d.tar.gz
SledjHamr-21b381b129be99d6248fb27fdf4ca236e730224d.tar.bz2
SledjHamr-21b381b129be99d6248fb27fdf4ca236e730224d.tar.xz
Oops * 2, fix LSL.listAdd().
Diffstat (limited to 'lib')
-rw-r--r--lib/LSL.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/LSL.lua b/lib/LSL.lua
index c64a3bc..713a605 100644
--- a/lib/LSL.lua
+++ b/lib/LSL.lua
@@ -1009,17 +1009,17 @@ function LSL.listAdd(a, b)
1009 local result = {} 1009 local result = {}
1010 1010
1011 -- Deal with implicit typecasts. 1011 -- Deal with implicit typecasts.
1012 if 'list' ~= type(a) then a = {a} end 1012 if 'table' ~= type(a) then a = {a} end
1013 if 'list' ~= type(b) then b = {b} end 1013 if 'table' ~= type(b) then b = {b} end
1014 1014
1015 for j, v in ipairs(a) do 1015 for j, v in ipairs(a) do
1016 i = i + 1
1017 table.insert(result, i, v) 1016 table.insert(result, i, v)
1017 i = i + 1
1018 end 1018 end
1019 1019
1020 for j, v in ipairs(b) do 1020 for j, v in ipairs(b) do
1021 i = i + 1
1022 table.insert(result, i, v) 1021 table.insert(result, i, v)
1022 i = i + 1
1023 end 1023 end
1024 1024
1025 return result; 1025 return result;