From 5b3d446b750220b550780407224480a14a125e25 Mon Sep 17 00:00:00 2001 From: Quinten Mennen Date: Wed, 26 Feb 2025 18:36:33 +0100 Subject: [PATCH] null terminate exapnd string mem --- src/expander/expander_allocate_memory.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/expander/expander_allocate_memory.c b/src/expander/expander_allocate_memory.c index 317466c..bd92a16 100644 --- a/src/expander/expander_allocate_memory.c +++ b/src/expander/expander_allocate_memory.c @@ -1,12 +1,12 @@ /* ************************************************************************** */ /* */ -/* :::::::: */ -/* expander_allocate_memory.c :+: :+: */ -/* +:+ */ -/* By: qmennen +#+ */ -/* +#+ */ -/* Created: 2025/02/19 13:57:19 by qmennen #+# #+# */ -/* Updated: 2025/02/26 16:10:42 by whaffman ######## odam.nl */ +/* ::: :::::::: */ +/* expander_allocate_memory.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: qmennen +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2025/02/19 13:57:19 by qmennen #+# #+# */ +/* Updated: 2025/02/26 18:05:17 by qmennen ### ########.fr */ /* */ /* ************************************************************************** */ @@ -37,5 +37,6 @@ char *expander_allocate_memory( } size += ft_strlen(s); string = malloc_safe(msh, size); + string[0] = 0; return (string); }