From: Lukas Jiriste Date: Thu, 20 Jun 2024 08:47:16 +0000 (+0200) Subject: Fix logic bug X-Git-Url: https://git.ljiriste.work/?a=commitdiff_plain;h=610d09a9036b0037fd89fc4d8ef65ef751bf83c3;p=Libft.git Fix logic bug --- diff --git a/ft_parse/ft_parse.c b/ft_parse/ft_parse.c index a1eb575..e22015d 100644 --- a/ft_parse/ft_parse.c +++ b/ft_parse/ft_parse.c @@ -6,7 +6,7 @@ /* By: ljiriste +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/05/20 20:51:36 by ljiriste #+# #+# */ -/* Updated: 2024/06/16 18:27:16 by ljiriste ### ########.fr */ +/* Updated: 2024/06/20 10:08:13 by ljiriste ### ########.fr */ /* */ /* ************************************************************************** */ @@ -190,8 +190,7 @@ static t_vec parse_goto(const char *line) ++line; if (!*line) break ; - else - ++line; + ++line; if (!*line) break ; else if (*line == ';') @@ -216,7 +215,7 @@ static int add_line(t_vec *states, const char *line, size_t lookahead_size) { while (condensed_line[i] && condensed_line[i] != ';') ++i; - if (!condensed_line[i]) + if (condensed_line[i]) ++i; --lookahead_size; }