diff --git a/src/BizHawk.Client.Common/lua/LuaHelper.cs b/src/BizHawk.Client.Common/lua/LuaHelper.cs index 802d594e40..0eb79f844b 100644 --- a/src/BizHawk.Client.Common/lua/LuaHelper.cs +++ b/src/BizHawk.Client.Common/lua/LuaHelper.cs @@ -24,11 +24,7 @@ namespace BizHawk.Client.Common public static LuaTable ToLuaTable(this IList list, Lua lua, int indexFrom = 0) { var table = lua.NewTable(); - var indexAfterLast = indexFrom + list.Count; - for (var i = indexFrom; i != indexAfterLast; i++) - { - table[i] = list[i]; - } + for (int i = 0, l = list.Count; i != l; i++) table[indexFrom + i] = list[i]; return table; }