diff options
-rw-r--r-- | src/ft_p_lcom.c | 2 | ||||
-rw-r--r-- | src/ft_p_line.c | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/ft_p_lcom.c b/src/ft_p_lcom.c index 9a7a1b8..9a678e6 100644 --- a/src/ft_p_lcom.c +++ b/src/ft_p_lcom.c @@ -132,7 +132,7 @@ int8_t i = 0; if (!(words = ft_split(line, ';'))) return (-1); - while (i <= count) + while (i <= count && words[i]) { if (!(link = ft_lcom_new(words[i], msh))) { diff --git a/src/ft_p_line.c b/src/ft_p_line.c index b1ba6b2..b827503 100644 --- a/src/ft_p_line.c +++ b/src/ft_p_line.c @@ -41,6 +41,7 @@ void { count -= 1; } + ft_printf("%lu\n", count); if (ft_p_lcom(line, count, msh) < 0) { ft_s_destroy(msh); |