Переглянути джерело

structure: IndexedList: fix an assert which should be stricter

ambrop7 13 роки тому
батько
коміт
7e3da6f3f0
1 змінених файлів з 1 додано та 1 видалено
  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)