diff options
author | Rudy Bousset <rbousset@z2r4p3.le-101.fr> | 2020-02-24 20:54:28 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r4p3.le-101.fr> | 2020-02-24 20:54:28 +0100 |
commit | aa0fc403f7f81dedfa3fe22235aecceaf7b91e27 (patch) | |
tree | 2ae016d6fb79acf8c7e734e05bfb46bab70b1765 /src/ft_get_res.c | |
parent | Norme (diff) | |
download | 42-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_res.c')
-rw-r--r-- | src/ft_get_res.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/ft_get_res.c b/src/ft_get_res.c index 26853be..9bcf4ef 100644 --- a/src/ft_get_res.c +++ b/src/ft_get_res.c @@ -24,8 +24,7 @@ static int8_t i++; if (i != ft_strlen(word)) { - ft_strlcpy(clist->errmsg, FT_ERR_RES_ALPHA, - ft_strlen(FT_ERR_RES_ALPHA) + 1); + ft_sprintf(clist->errmsg, "%s", FT_ERR_RES_ALPHA); return (-1); } return (0); @@ -49,7 +48,7 @@ int8_t if (!(*words + 0) || !(*(words + 1)) || !(*(words + 2)) || (*(words + 3))) { - ft_strlcpy(clist->errmsg, FT_ERR_ARGS, ft_strlen(FT_ERR_ARGS) + 1); + ft_sprintf(clist->errmsg, "%s", FT_ERR_ARGS); return (-1); } if ((ft_checkdigit(words[1], clist) < 0) || @@ -60,8 +59,7 @@ int8_t if (wlist->x_size <= 10 || wlist->y_size <= 10) { - ft_strlcpy(clist->errmsg, FT_ERR_RES_SMALL, - ft_strlen(FT_ERR_RES_SMALL) + 1); + ft_sprintf(clist->errmsg, "%s", FT_ERR_RES_SMALL); return (-1); } if (ft_get_screen_size(wlist) < 0) |