summaryrefslogtreecommitdiffstats
path: root/src/c_utils.c
diff options
context:
space:
mode:
authorjoe <rbousset@42lyon.fr>2020-12-07 14:05:28 +0100
committerjoe <rbousset@42lyon.fr>2020-12-07 14:05:28 +0100
commit4c1865297f02111787b494cbcc599f268b8af240 (patch)
tree0eadce65542ab57a75edc81e29b3b8c571e968d6 /src/c_utils.c
parentfix (diff)
download42-minishell-4c1865297f02111787b494cbcc599f268b8af240.tar.gz
42-minishell-4c1865297f02111787b494cbcc599f268b8af240.tar.bz2
42-minishell-4c1865297f02111787b494cbcc599f268b8af240.tar.xz
42-minishell-4c1865297f02111787b494cbcc599f268b8af240.tar.zst
42-minishell-4c1865297f02111787b494cbcc599f268b8af240.zip
changes
Diffstat (limited to '')
-rw-r--r--src/c_utils.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/c_utils.c b/src/c_utils.c
index a25a35a..95ad28d 100644
--- a/src/c_utils.c
+++ b/src/c_utils.c
@@ -70,8 +70,8 @@ char
j++;
}
}
- ft_memdel((void**)&str);
- return (dst);
+ ft_memdel((void*)&str);
+return (dst);
}
char
@@ -134,6 +134,7 @@ short
{
unsigned int i;
unsigned int j;
+ size_t len;
(void)msh;
tcaps->nlines = c_get_line_num(line, tcaps->cpos,
@@ -150,7 +151,9 @@ short
while (i++ < tcaps->plen)
tputs(tgetstr("nd", NULL), 1, ft_putchar);
ft_printf("%s", line);
- return ((tcaps->cpos != ft_strlen(line)) ?
- c_redraw_next(tcaps->plen, ft_strlen(line), tcaps) :
- ft_strlen(line));
+ len = ft_strlen(line);
+ /* ft_memdel((void*)&line); */
+ return ((tcaps->cpos != len) ?
+ c_redraw_next(tcaps->plen, len, tcaps) :
+ len);
}