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