From 6c15d514aa52caa1200308a36eca959f1829c532 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Tue, 29 Aug 2023 20:54:32 -0500 Subject: [PATCH] Cleanup: Add comment to help clarify the size * 2 logic. This will comment should help future proof accidental incorrect changes to this value. --- level_2/fll_execute/c/execute.c | 1 + 1 file changed, 1 insertion(+) diff --git a/level_2/fll_execute/c/execute.c b/level_2/fll_execute/c/execute.c index 5fb1d71..bc7c5e9 100644 --- a/level_2/fll_execute/c/execute.c +++ b/level_2/fll_execute/c/execute.c @@ -48,6 +48,7 @@ extern "C" { #endif // _di_level_2_parameter_checking_ { + // Allocate "size * 2" to ensure space for both th name and value are available. f_status_t status = f_memory_array_increase_by(size * 2, sizeof(f_string_dynamic_t), (void **) &arguments->array, &arguments->used, &arguments->size); for (f_number_unsigned_t i = 0; i < size; ++i) { -- 1.8.3.1