mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Fixed bug in the remove function of the sorted list class.
This commit is contained in:
parent
4890c306c4
commit
7aff476117
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue