From 248372704dff81b91153d9e43a4b29a08551f99f Mon Sep 17 00:00:00 2001 From: salad Date: Wed, 16 Dec 2020 19:41:11 +0100 Subject: ormnshitz --- src/c_init.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/c_init.c b/src/c_init.c index 59cb5fa..4bfcf26 100644 --- a/src/c_init.c +++ b/src/c_init.c @@ -157,8 +157,9 @@ short msh->sig = 0; tcaps.plen = (unsigned int)m_plen(msh->ps[psx - 1]); *line = NULL; - if (!(*line = ft_calloc(sizeof(char), 1))) - return (-1); + if (*line == NULL) + if (!(*line = ft_calloc(sizeof(char), 1))) + return (-1); if (!(c_get_win_size(&tcaps.ws))) return (-1); while (!(ft_strchr(nread, '\n'))) -- cgit v1.2.3