- changed custom module pruning iteration to run from #elements to 1 instead so that table.remove doesn't screw itself

This commit is contained in:
Parnic
2009-07-25 04:56:32 +00:00
parent 33aa08552d
commit eb80363e54

View File

@ -105,7 +105,7 @@ function IceCore.prototype:Enable()
-- go through the list of loaded elements that don't have associated settings and dump them
toRemove = {}
for i = 1, table.getn(self.elements) do
for i = #self.elements, 1, -1 do
if not self.settings.modules[self.elements[i]:GetElementName()] then
toRemove[#toRemove + 1] = i
end