]> Kevux Git Server - fll/commitdiff
Update: f_memory_structure_increase_by() shouldn't do anything if amount is 0.
authorKevin Day <thekevinday@gmail.com>
Thu, 1 Sep 2022 02:45:37 +0000 (21:45 -0500)
committerKevin Day <thekevinday@gmail.com>
Thu, 1 Sep 2022 02:45:37 +0000 (21:45 -0500)
level_0/f_memory/c/memory/structure.c

index 22dc2636bf45726d3cb4a7f0fe8c79d5dc39a616..cc9d577b1b3bcae01587a799aa4a1fdf780fbde4 100644 (file)
@@ -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);
       }