diff options
author | Salad <water_appreciator@protonmail.com> | 2020-10-19 17:32:53 +0200 |
---|---|---|
committer | Salad <water_appreciator@protonmail.com> | 2020-10-19 17:32:53 +0200 |
commit | 35ea2d4a8a529c8680891cd1aae8cfe0088dd284 (patch) | |
tree | 465f5be4e8900152151f384adeacb188e0b9c03a /src/c_utils.c | |
parent | qsd (diff) | |
download | 42-minishell-35ea2d4a8a529c8680891cd1aae8cfe0088dd284.tar.gz 42-minishell-35ea2d4a8a529c8680891cd1aae8cfe0088dd284.tar.bz2 42-minishell-35ea2d4a8a529c8680891cd1aae8cfe0088dd284.tar.xz 42-minishell-35ea2d4a8a529c8680891cd1aae8cfe0088dd284.tar.zst 42-minishell-35ea2d4a8a529c8680891cd1aae8cfe0088dd284.zip |
FIX ALL NIG
Diffstat (limited to '')
-rw-r--r-- | src/c_utils.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/c_utils.c b/src/c_utils.c index b18b949..ad1ccba 100644 --- a/src/c_utils.c +++ b/src/c_utils.c @@ -120,16 +120,17 @@ static int16_t tputs(tgetstr("up", NULL), 1, ft_putchar); tputs(tgetstr("up", NULL), 1, ft_putchar); tputs(tgetstr("cr", NULL), 1, ft_putchar); - while (i <= (tcaps->cpos + plen)) + while (i < (tcaps->cpos + plen)) { tputs(tgetstr("nd", NULL), 1, ft_putchar); i++; } } else - while (--len > tcaps->cpos) + while (len > tcaps->cpos) { tputs(tgetstr("le", NULL), 1, ft_putchar); + len--; } return (len); } @@ -147,12 +148,6 @@ int16_t i = 0; j = tcaps->lpos; tputs(tgetstr("cr", NULL), 1, ft_putchar); - if ((((tcaps->cpos + 1) + ft_strlen(msh->ps[tcaps->psx])) % - tcaps->ws.ws_col) == 0) - { - tputs(tgetstr("sf", NULL), 1, ft_putchar); - return (1); - } while (--j > 0) { tputs(tgetstr("sf", NULL), 1, ft_putchar); |