Module:TableTools: Difference between revisions
sparseIpairs: return nil explicitly if i > lim
m>Mr. Stradivarius m (Protected Module:TableTools: High-risk Lua module ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite))) |
m>Mr. Stradivarius (sparseIpairs: return nil explicitly if i > lim) |
||
Line 186: | Line 186: | ||
local key = nums[i] | local key = nums[i] | ||
return key, t[key] | return key, t[key] | ||
else | |||
return nil, nil | |||
end | end | ||
end | end |