diff options
Diffstat (limited to 'src/ft_init_lists.c')
-rw-r--r-- | src/ft_init_lists.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/ft_init_lists.c b/src/ft_init_lists.c index 217d303..54a7902 100644 --- a/src/ft_init_lists.c +++ b/src/ft_init_lists.c @@ -31,15 +31,13 @@ t_cub !(clist->so_tex_path = (char*)ft_calloc(1, sizeof(char))) || !(clist->ea_tex_path = (char*)ft_calloc(1, sizeof(char))) || !(clist->we_tex_path = (char*)ft_calloc(1, sizeof(char))) || - !(clist->sprite_path = (char*)ft_calloc(1, sizeof(char)))) + !(clist->sprite_path = (char*)ft_calloc(1, sizeof(char))) || + !(clist->map = (char**)ft_calloc(2, sizeof(char*))) || + !(clist->map[0] = (char*)ft_calloc(1, sizeof(char)))) return (NULL); + clist->map[1] = 0; clist->f_color = -1; clist->c_color = -1; - if (!(clist->map = (char**)ft_calloc(2, sizeof(char*)))) - return (NULL); - if (!(clist->map[0] = (char*)ft_calloc(1, sizeof(char)))) - return (NULL); - clist->map[1] = 0; clist->map_w = 0; clist->line_chk = 0; return (clist); |