From c19660e6d8a28ca9d9b9d77515c79f294a8b3d6f Mon Sep 17 00:00:00 2001 From: maix0 Date: Mon, 14 Oct 2024 18:57:07 +0200 Subject: [PATCH] update: changed allocator and fixed undefined value --- stdme/output/src/convert/i32_to_str.c | 3 ++- stdme/src/mem/allocator.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/stdme/output/src/convert/i32_to_str.c b/stdme/output/src/convert/i32_to_str.c index 65be457f..cc773279 100644 --- a/stdme/output/src/convert/i32_to_str.c +++ b/stdme/output/src/convert/i32_to_str.c @@ -6,7 +6,7 @@ /* By: maiboyer +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/02/01 21:15:19 by maiboyer #+# #+# */ -/* Updated: 2024/10/12 17:52:14 by rparodi ### ########.fr */ +/* Updated: 2024/10/14 18:54:58 by maiboyer ### ########.fr */ /* */ /* ************************************************************************** */ @@ -24,6 +24,7 @@ t_error i32_to_str_base_prefix(t_i32 val, t_str base, t_str prefix, t_str *out) if (out == NULL || base == NULL || prefix == NULL) return (ERROR); + value.u64 = 0; value.i32 = val; is_nonnegative = value.u32 & 0x80000000; if (is_nonnegative) diff --git a/stdme/src/mem/allocator.c b/stdme/src/mem/allocator.c index a18a965e..aaf5f513 100644 --- a/stdme/src/mem/allocator.c +++ b/stdme/src/mem/allocator.c @@ -6,7 +6,7 @@ /* By: maiboyer +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/05/14 18:26:27 by maiboyer #+# #+# */ -/* Updated: 2024/10/14 14:48:10 by maiboyer ### ########.fr */ +/* Updated: 2024/10/14 18:48:19 by maiboyer ### ########.fr */ /* */ /* ************************************************************************** */ @@ -25,7 +25,7 @@ t_allocator *global_allocator(void) if (!init) { init = true; - global_alloc = lc_init(); + global_alloc = m_init(); } return (&global_alloc); }