Prechádzať zdrojové kódy

structure: IndexedList: fix an assert which should be stricter

ambrop7 13 rokov pred
rodič
commit
7e3da6f3f0
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  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)