From eaf84a7850f2af70b16fb417cd002f5e39df5db2 Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Tue, 5 Aug 2025 10:38:20 -0400 Subject: Re-add sending array to packet_pool, build fixes Signed-off-by: Andrew Opalach --- src/util/file/util.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/util') diff --git a/src/util/file/util.c b/src/util/file/util.c index a2201a7..2f1fa36 100644 --- a/src/util/file/util.c +++ b/src/util/file/util.c @@ -15,12 +15,13 @@ s32 nn_file_read_as_str(struct nn_file *file, str *out) s32 nn_file_read_as_c_str(struct nn_file *file, char **out) { size_t size = file->size; - *out = (char *)al_malloc(size + 1); - if (!nn_file_read(file, (void *)*out, size)) { + char *c_str = (char *)al_malloc(size + 1); + if (!nn_file_read(file, c_str, size)) { al_free(*out); return -1; } - (*out)[size] = '\n'; + c_str[size] = '\n'; + *out = c_str; return size; } -- cgit v1.2.3-101-g0448