Fixed bug in the remove function of the sorted list class.

This commit is contained in:
Jonas 'Sortie' Termansen 2011-11-24 10:41:13 +01:00
parent 4890c306c4
commit 7aff476117
1 changed files with 2 additions and 1 deletions

View File

@ -147,8 +147,9 @@ namespace Maxsi
T Remove(size_t index)
{
if ( !(flags & FLAG_SORTED) ) { Sort(); }
ASSERT(index < listused);
T result = list[listused-1];
T result = list[index];
if ( index == listused-1 )
{