Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make dictionary internal table dynamic (and automatically resized).
[simgrid.git] / src / xbt / dict_cursor.c
index 6541118..4a2986b 100644 (file)
@@ -58,7 +58,7 @@ void xbt_dict_cursor_free(xbt_dict_cursor_t *cursor) {
 /*
  * Sanity check to see if the head contains something
  */
-static _XBT_INLINE void __cursor_not_null(xbt_dict_cursor_t cursor) {
+static XBT_INLINE void __cursor_not_null(xbt_dict_cursor_t cursor) {
   xbt_assert0(cursor, "Null cursor");
 }
 
@@ -122,7 +122,7 @@ void xbt_dict_cursor_step(xbt_dict_cursor_t cursor) {
       DEBUG1("next element: %p", current);
     }
     
-    while (current == NULL && ++line < cursor->dict->table_size) {
+    while (current == NULL && ++line <= cursor->dict->table_size) {
       DEBUG0("current is NULL, take the next line");
       current = cursor->dict->table[line];
       DEBUG1("element in the next line: %p", current);