From 35ea2d4a8a529c8680891cd1aae8cfe0088dd284 Mon Sep 17 00:00:00 2001 From: Salad Date: Mon, 19 Oct 2020 17:32:53 +0200 Subject: FIX ALL NIG --- src/c_utils.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/c_utils.c') 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); -- cgit v1.2.3