Explorar o código

structure: IndexedList: fix an assert which should be stricter

ambrop7 %!s(int64=13) %!d(string=hai) anos
pai
achega
7e3da6f3f0
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      structure/IndexedList.h

+ 1 - 1
structure/IndexedList.h

@@ -206,7 +206,7 @@ static uint64_t IndexedList_IndexOf (IndexedList *o, IndexedListNode *node)
 
 static IndexedListNode * IndexedList_GetAt (IndexedList *o, uint64_t index)
 {
-    ASSERT(index <= IndexedList__Tree_Count(&o->tree, o))
+    ASSERT(index < IndexedList__Tree_Count(&o->tree, o))
     
     IndexedList__TreeNode ref = IndexedList__Tree_GetAt(&o->tree, o, index);
     ASSERT(ref.link != IndexedList__TreeNullLink)