From 47fb7c22f8c9d75058c2a7471bd2be3b76145ff2 Mon Sep 17 00:00:00 2001 From: salad Date: Fri, 18 Dec 2020 16:30:40 +0100 Subject: nolik --- src/c_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/c_init.c') diff --git a/src/c_init.c b/src/c_init.c index cea3cce..c5c2dea 100644 --- a/src/c_init.c +++ b/src/c_init.c @@ -72,7 +72,7 @@ static short return (c_ctrl_l(line, tcaps, msh)); else if ((*((unsigned int *)buf)) == CTRL_D && line[0] == '\0') - return (c_ctrl_d(msh)); + return (c_ctrl_d(line, msh)); return (0); } @@ -125,7 +125,7 @@ char static char *c_process_key(char **line, char *buf, t_caps *tcaps, t_msh *msh) { - if (ft_isprint(buf[0])) + if (ft_isprint(buf[0]) && *line != NULL) c_add_char(line, buf, tcaps); else if (((*((unsigned int *)buf)) == UP_K) || ((*((unsigned int *)buf)) == CTRL_P) || -- cgit v1.2.3