update: changed allocator and fixed undefined value
This commit is contained in:
parent
135a6429ee
commit
c19660e6d8
2 changed files with 4 additions and 3 deletions
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/02/01 21:15:19 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)
|
if (out == NULL || base == NULL || prefix == NULL)
|
||||||
return (ERROR);
|
return (ERROR);
|
||||||
|
value.u64 = 0;
|
||||||
value.i32 = val;
|
value.i32 = val;
|
||||||
is_nonnegative = value.u32 & 0x80000000;
|
is_nonnegative = value.u32 & 0x80000000;
|
||||||
if (is_nonnegative)
|
if (is_nonnegative)
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/05/14 18:26:27 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)
|
if (!init)
|
||||||
{
|
{
|
||||||
init = true;
|
init = true;
|
||||||
global_alloc = lc_init();
|
global_alloc = m_init();
|
||||||
}
|
}
|
||||||
return (&global_alloc);
|
return (&global_alloc);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue