diff options
author | Rudy Bousset <rbousset@z2r5p6.le-101.fr> | 2020-02-02 16:45:32 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r5p6.le-101.fr> | 2020-02-02 16:45:32 +0100 |
commit | 8f60709261d2bdd37ab64256128790c2874e20bf (patch) | |
tree | 500084a7d3faa1b586ebb4b5ef92f81653a30b60 /src/ft_init_lists.c | |
parent | Removed useless file (diff) | |
download | 42-cub3d-8f60709261d2bdd37ab64256128790c2874e20bf.tar.gz 42-cub3d-8f60709261d2bdd37ab64256128790c2874e20bf.tar.bz2 42-cub3d-8f60709261d2bdd37ab64256128790c2874e20bf.tar.xz 42-cub3d-8f60709261d2bdd37ab64256128790c2874e20bf.tar.zst 42-cub3d-8f60709261d2bdd37ab64256128790c2874e20bf.zip |
Less lines
Diffstat (limited to '')
-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); |