aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_get_map.c
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r4p3.le-101.fr>2020-02-24 20:54:28 +0100
committerRudy Bousset <rbousset@z2r4p3.le-101.fr>2020-02-24 20:54:28 +0100
commitaa0fc403f7f81dedfa3fe22235aecceaf7b91e27 (patch)
tree2ae016d6fb79acf8c7e734e05bfb46bab70b1765 /src/ft_get_map.c
parentNorme (diff)
download42-cub3d-aa0fc403f7f81dedfa3fe22235aecceaf7b91e27.tar.gz
42-cub3d-aa0fc403f7f81dedfa3fe22235aecceaf7b91e27.tar.bz2
42-cub3d-aa0fc403f7f81dedfa3fe22235aecceaf7b91e27.tar.xz
42-cub3d-aa0fc403f7f81dedfa3fe22235aecceaf7b91e27.tar.zst
42-cub3d-aa0fc403f7f81dedfa3fe22235aecceaf7b91e27.zip
sprintf is bav
Diffstat (limited to 'src/ft_get_map.c')
-rw-r--r--src/ft_get_map.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/ft_get_map.c b/src/ft_get_map.c
index cb677da..f609c50 100644
--- a/src/ft_get_map.c
+++ b/src/ft_get_map.c
@@ -54,8 +54,7 @@ static int8_t
((clist->mlist->map_w + 1) * i) * sizeof(char),
((clist->mlist->map_w + 1) * (i + 1)) * sizeof(char))))
{
- ft_strlcpy(clist->errmsg, FT_ERR_ALLOCATE,
- ft_strlen(FT_ERR_ALLOCATE) + 1);
+ ft_sprintf(clist->errmsg, "%s", FT_ERR_ALLOCATE);
return (-1);
}
ft_linecpy(line, clist->mlist->mapl, (clist->mlist->map_w + 1) * i);
@@ -69,14 +68,14 @@ int
if (!line[0])
{
ft_memdel((void**)&line);
- ft_strlcpy(clist->errmsg, FT_ERR_READ, ft_strlen(FT_ERR_READ) + 1);
+ ft_sprintf(clist->errmsg, "%s", FT_ERR_READ);
return (-1);
}
clist->mlist->map_w = ft_get_line_len(line);
if (ft_check_map_line(line, 1, clist) < 0)
{
ft_memdel((void**)&line);
- ft_strlcpy(clist->errmsg, FT_ERR_READ, ft_strlen(FT_ERR_READ) + 1);
+ ft_sprintf(clist->errmsg, "%s", FT_ERR_READ);
return (-1);
}
ft_memdel((void**)&clist->mlist->mapl);