diff --git a/Source.lua b/Source.lua index 4d3e3ef..c43e39a 100644 --- a/Source.lua +++ b/Source.lua @@ -14,6 +14,7 @@ local table_unpack = table.unpack local table_create = table.create local table_insert = table.insert local table_remove = table.remove +local table_concat = table.concat local coroutine_create = coroutine.create local coroutine_yield = coroutine.yield @@ -1018,10 +1019,17 @@ local function luau_load(module, env, luau_settings) local value = stack[inst.B] stack[inst.A] = if value then value else inst.K or false elseif op == 49 then --[[ CONCAT ]] - local s = "" - for i = inst.B, inst.C do - s ..= stack[i] + local B, C = inst.B, inst.C + local success, s = pcall(table_concat, stack, "", B, C) + + if not success then + str = stack[B] + + for i = B + 1, C do + str ..= stack[i] + end end + stack[inst.A] = s elseif op == 50 then --[[ NOT ]] stack[inst.A] = not stack[inst.B]