Fixed bug in the remove function of the sorted list class.
This commit is contained in:
parent
4890c306c4
commit
7aff476117
|
@ -147,8 +147,9 @@ namespace Maxsi
|
||||||
T Remove(size_t index)
|
T Remove(size_t index)
|
||||||
{
|
{
|
||||||
if ( !(flags & FLAG_SORTED) ) { Sort(); }
|
if ( !(flags & FLAG_SORTED) ) { Sort(); }
|
||||||
|
ASSERT(index < listused);
|
||||||
|
|
||||||
T result = list[listused-1];
|
T result = list[index];
|
||||||
|
|
||||||
if ( index == listused-1 )
|
if ( index == listused-1 )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue