Fixed illegal removal. Removed an unused variable

This commit is contained in:
Justin van der Leij 2018-07-30 12:39:01 +02:00
parent 6954b112e9
commit cc619dae66
2 changed files with 2 additions and 2 deletions

View file

@ -39,8 +39,9 @@ end
-- @return self
function List:remove(obj)
local index = self.pointers[obj]
if not index then return end
local size = self.size
if index == size then
self.objects[size] = nil
else