From: Kevin Day Date: Sat, 18 Jul 2020 05:08:58 +0000 (-0500) Subject: Bugfix: extended content has wrong size. X-Git-Tag: 0.5.0~77 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=1607d2a8b1116bf7f1acec0fcc200b4f69b8a315;p=fll Bugfix: extended content has wrong size. This is happening because the status variable is being overwritten when allocating. Use a separate status variable for allocation. --- diff --git a/level_1/fl_fss/c/fss_extended.c b/level_1/fl_fss/c/fss_extended.c index 9e438fc..5538319 100644 --- a/level_1/fl_fss/c/fss_extended.c +++ b/level_1/fl_fss/c/fss_extended.c @@ -48,6 +48,7 @@ extern "C" { #endif // _di_level_1_parameter_checking_ f_status status = F_none; + f_status status_allocate = F_none; status = f_fss_skip_past_space(*buffer, range); if (F_status_is_error(status)) return status; @@ -82,17 +83,18 @@ extern "C" { return F_status_set_error(F_buffer_too_large); } else { - f_macro_fss_content_resize(status, (*found), found->size + f_fss_default_allocation_step); + f_macro_fss_content_resize(status_allocate, (*found), found->size + f_fss_default_allocation_step); } } else { - f_macro_fss_content_resize(status, (*found), found->size + f_fss_default_allocation_step); + f_macro_fss_content_resize(status_allocate, (*found), found->size + f_fss_default_allocation_step); } - if (F_status_is_error(status)) return status; + if (F_status_is_error(status_allocate)) return status_allocate; if (quoteds) { - f_macro_fss_quoteds_resize(status, (*quoteds), found->size); + f_macro_fss_quoteds_resize(status_allocate, (*quoteds), found->size); + if (F_status_is_error(status_allocate)) return status_allocate; } }