diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-01-24 18:05:37 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-01-24 18:05:37 +0100 |
commit | 92ff90257b33b74ec98d611a60815bdc7a89548a (patch) | |
tree | f93751be79d513d0b7c77176749da8a17cdeefef | |
parent | Tons of changes (diff) | |
download | 42-cub3d-92ff90257b33b74ec98d611a60815bdc7a89548a.tar.gz 42-cub3d-92ff90257b33b74ec98d611a60815bdc7a89548a.tar.bz2 42-cub3d-92ff90257b33b74ec98d611a60815bdc7a89548a.tar.xz 42-cub3d-92ff90257b33b74ec98d611a60815bdc7a89548a.tar.zst 42-cub3d-92ff90257b33b74ec98d611a60815bdc7a89548a.zip |
Added a second map for error management
-rw-r--r-- | map/map_two.cub | 2 | ||||
-rw-r--r-- | src/ft_get_tex.c | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/map/map_two.cub b/map/map_two.cub new file mode 100644 index 0000000..2f45994 --- /dev/null +++ b/map/map_two.cub @@ -0,0 +1,2 @@ +R 800 600 +NO ./path_to_the_north_texture
\ No newline at end of file diff --git a/src/ft_get_tex.c b/src/ft_get_tex.c index 5bd7a4f..65c8441 100644 --- a/src/ft_get_tex.c +++ b/src/ft_get_tex.c @@ -37,7 +37,10 @@ ft_get_tex_so(int fd, t_win *wlist) return (ft_exit(5, wlist)); if (!(*words) || ft_strcmp(*words, "SO") || !(*(words + 1)) || (*(words + 2))) + { + /* ft_free_words(words); */ return (ft_map_error(3, wlist)); + } ft_memdel(wlist->clist->so_tex_path); len = ft_strlen(*(words + 1)); if (!(wlist->clist->so_tex_path = (char*)malloc((len + 1) * sizeof(char)))) |