Index: src/map.c ================================================================== --- src/map.c +++ src/map.c @@ -356,14 +356,14 @@ } void cfw_map_iter(CFWMap *map, cfw_map_iter_t *iter) { - iter->key = NULL; - iter->obj = NULL; iter->_map = map; iter->_pos = 0; + + cfw_map_iter_next(iter); } void cfw_map_iter_next(cfw_map_iter_t *iter) { Index: tests/tests.c ================================================================== --- tests/tests.c +++ tests/tests.c @@ -36,11 +36,10 @@ print_map(CFWMap *map) { cfw_map_iter_t iter; cfw_map_iter(map, &iter); - cfw_map_iter_next(&iter); fputs("{\n", stdout); while (iter.key != NULL) { printf("\t%s = %s\n",