Skip to content

Commit

Permalink
fixed map iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorGRBR committed Jun 18, 2024
1 parent 7c43881 commit c29f19b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/ylist_b.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

#include "ylist.h"
#include "ydefines.h"
#include <stdlib.h>

void list_remove(t_list *list, void *e)
{
Expand Down
4 changes: 2 additions & 2 deletions src/ymap_iter_a.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ static t__mic *get_next_container(t_map *map, t_uint *bucket, t_list_iter *it)
{
t_list *bucket_ptr;

if (it->list && list_iter_next(it))
return (it->value);
if (*bucket >= map->bucket_array_size)
return (YNULL);
if (list_iter_next(it))
return (it->value);
bucket_ptr = &map->bucket_array[*bucket];
while (*bucket < map->bucket_array_size)
{
Expand Down

0 comments on commit c29f19b

Please sign in to comment.