From 6cdfac94a43e4328511f7fbcc0186f18b8d7563b Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Fri, 17 Feb 2023 19:14:22 -0600 Subject: [PATCH] Update: Allocate extra space for the terminating NULL. --- level_3/fake/c/private-make-operate.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/level_3/fake/c/private-make-operate.c b/level_3/fake/c/private-make-operate.c index 1258c59..bf789cc 100644 --- a/level_3/fake/c/private-make-operate.c +++ b/level_3/fake/c/private-make-operate.c @@ -583,7 +583,7 @@ extern "C" { } // for } // for - *status = f_string_dynamic_increase_by(l, &data_make->cache_arguments.array[data_make->cache_arguments.used]); + *status = f_string_dynamic_increase_by(l + f_string_space_s.used + 1, &data_make->cache_arguments.array[data_make->cache_arguments.used]); if (F_status_is_error(*status)) { fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamic_increase_by", F_true); @@ -681,7 +681,7 @@ extern "C" { } // for } // for - *status = f_string_dynamic_increase_by(l, &data_make->cache_arguments.array[data_make->cache_arguments.used]); + *status = f_string_dynamic_increase_by(l + f_string_space_s.used + 1, &data_make->cache_arguments.array[data_make->cache_arguments.used]); if (F_status_is_error(*status)) { fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamic_increase_by", F_true); @@ -1196,7 +1196,7 @@ extern "C" { data_make->cache_1.used = 0; data_make->cache_2.used = 0; - status = f_string_dynamic_increase_by((range_name.stop - range_name.start) + 1, &data_make->cache_1); + status = f_string_dynamic_increase_by((range_name.stop - range_name.start) + 2, &data_make->cache_1); if (F_status_is_error_not(status)) { status = f_string_dynamic_partial_append_nulless(data_make->buffer, range_name, &data_make->cache_1); -- 1.8.3.1