diff options
Diffstat (limited to 'src/c_utils.c')
-rw-r--r-- | src/c_utils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/c_utils.c b/src/c_utils.c index dc9522d..372f66d 100644 --- a/src/c_utils.c +++ b/src/c_utils.c @@ -139,12 +139,12 @@ int16_t len = ft_strlen(line); mod = (tcaps->ws.ws_col); tputs(tgetstr("cr", NULL), 1, ft_putchar); - if (((len + ft_strlen(msh->ps[0])) % mod) == 0) + if (((tcaps->cpos + ft_strlen(msh->ps[0])) % mod) == 0) { tputs(tgetstr("sf", NULL), 1, ft_putchar); return (1); } - while (--nlines > 0) + while (--tcaps->lpos > 0) { tputs(tgetstr("sf", NULL), 1, ft_putchar); tputs(tgetstr("up", NULL), 1, ft_putchar); |