From 87b90103930d83d74baa998866b0995cb8887d51 Mon Sep 17 00:00:00 2001 From: Christopher Uhlig Date: Sat, 25 Jan 2025 13:01:10 +0100 Subject: fixed leaks in tokenizer and collectargs also fixed seg for < > and improved value add by $ use --- src/new_token.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/new_token.c') diff --git a/src/new_token.c b/src/new_token.c index 6f49681..c9bd28c 100644 --- a/src/new_token.c +++ b/src/new_token.c @@ -6,11 +6,12 @@ /* By: chuhlig +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/06/27 14:29:44 by dkaiser #+# #+# */ -/* Updated: 2025/01/22 00:41:47 by chuhlig ### ########.fr */ +/* Updated: 2025/01/24 18:46:05 by chuhlig ### ########.fr */ /* */ /* ************************************************************************** */ #include "token.h" +#include "libft.h" t_token *new_token(int type, t_token *previous, t_token *next) { @@ -39,7 +40,7 @@ t_token *new_str_token(char *str, t_token *previous, t_token *next) free(str); return (NULL); } - token->content.string = str; + token->content.string = ft_strdup(str); return (token); } -- cgit v1.2.3