From 98fe2697d6dc90266e4eb51901b4c04967836d10 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Wed, 31 Aug 2022 21:45:37 -0500 Subject: [PATCH] Update: f_memory_structure_increase_by() shouldn't do anything if amount is 0. --- level_0/f_memory/c/memory/structure.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/level_0/f_memory/c/memory/structure.c b/level_0/f_memory/c/memory/structure.c index 22dc263..cc9d577 100644 --- a/level_0/f_memory/c/memory/structure.c +++ b/level_0/f_memory/c/memory/structure.c @@ -89,7 +89,7 @@ extern "C" { if (!size) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (*used + amount > *size) { + if (amount && *used + amount > *size) { if (*used + amount > F_array_length_t_size_d) { return F_status_set_error(F_array_too_large); } -- 1.8.3.1