aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_get_map.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-03 20:26:03 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-03 20:26:03 +0100
commit3d5d770c0f43f9b4cfe59dc694f78b18803a7872 (patch)
treeae25b98e1dd04a82d9b44aea0649e4df5cd6dc45 /src/ft_get_map.c
parentNow better handling (diff)
download42-cub3d-3d5d770c0f43f9b4cfe59dc694f78b18803a7872.tar.gz
42-cub3d-3d5d770c0f43f9b4cfe59dc694f78b18803a7872.tar.bz2
42-cub3d-3d5d770c0f43f9b4cfe59dc694f78b18803a7872.tar.xz
42-cub3d-3d5d770c0f43f9b4cfe59dc694f78b18803a7872.tar.zst
42-cub3d-3d5d770c0f43f9b4cfe59dc694f78b18803a7872.zip
Changing stuff
Diffstat (limited to 'src/ft_get_map.c')
-rw-r--r--src/ft_get_map.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ft_get_map.c b/src/ft_get_map.c
index 60bcee0..fb8e0f2 100644
--- a/src/ft_get_map.c
+++ b/src/ft_get_map.c
@@ -54,7 +54,7 @@ static int8_t
((clist->mlist.map_w + 1) * i) * sizeof(char),
((clist->mlist.map_w + 1) * (i + 1)) * sizeof(char))))
{
- ft_sprintf(clist->errmsg, "%s", FT_ERR_ALLOCATE);
+ ft_sprintf(clist->errmsg, FT_ERR_ALLOCATE);
return (-1);
}
ft_linecpy(line, clist->mlist.mapl, (clist->mlist.map_w + 1) * i);
@@ -103,6 +103,8 @@ int
if (!line[0] || ft_check_map_line(line, 0, clist) < 0
|| ft_cat_mapl(line, i, clist) < 0)
{
+ if (!line[0])
+ ft_sprintf(clist->errmsg, FT_ERR_MAP_EMPL);
ft_memdel((void**)&line);
return (-1);
}