diff options
Diffstat (limited to 'src/ft_get_map.c')
-rw-r--r-- | src/ft_get_map.c | 4 |
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); } |