From: Kevin Day Date: Sat, 10 Dec 2022 16:56:50 +0000 (-0600) Subject: Bugfix: FSS write functions should use 'quote' when passed rather than f_fss_delimit_... X-Git-Tag: 0.6.2~24 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=a88c257d6a4644949cb640729c9dd19609353060;p=fll Bugfix: FSS write functions should use 'quote' when passed rather than f_fss_delimit_quote_single_s. --- diff --git a/level_1/fl_fss/c/fss/basic.c b/level_1/fl_fss/c/fss/basic.c index e82e410..23493a1 100644 --- a/level_1/fl_fss/c/fss/basic.c +++ b/level_1/fl_fss/c/fss/basic.c @@ -185,8 +185,8 @@ extern "C" { } } - destination->string[destination->used++] = quote ? f_fss_delimit_quote_single_s.string[0] : f_fss_delimit_quote_double_s.string[0]; - destination->string[destination->used++] = quote ? f_fss_delimit_quote_single_s.string[0] : f_fss_delimit_quote_double_s.string[0]; + destination->string[destination->used++] = quote ? quote : f_fss_delimit_quote_double_s.string[0]; + destination->string[destination->used++] = quote ? quote : f_fss_delimit_quote_double_s.string[0]; } if (complete == f_fss_complete_partial_e || complete == f_fss_complete_partial_trim_e || complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e) { diff --git a/level_1/fl_fss/c/fss/extended.c b/level_1/fl_fss/c/fss/extended.c index 56d5a17..09d53b8 100644 --- a/level_1/fl_fss/c/fss/extended.c +++ b/level_1/fl_fss/c/fss/extended.c @@ -151,8 +151,8 @@ extern "C" { if (F_status_is_error(status_allocation)) return status_allocation; } - destination->string[destination->used++] = quote ? f_fss_delimit_quote_single_s.string[0] : f_fss_delimit_quote_double_s.string[0]; - destination->string[destination->used++] = quote ? f_fss_delimit_quote_single_s.string[0] : f_fss_delimit_quote_double_s.string[0]; + destination->string[destination->used++] = quote ? quote : f_fss_delimit_quote_double_s.string[0]; + destination->string[destination->used++] = quote ? quote : f_fss_delimit_quote_double_s.string[0]; // Content should be terminated, even if empty. if (complete == f_fss_complete_partial_e || complete == f_fss_complete_partial_trim_e || complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e || complete == f_fss_complete_next_e) { @@ -236,8 +236,8 @@ f_status_t fl_fss_extended_object_write(const f_string_static_t object, const f_ } } - destination->string[destination->used++] = quote ? f_fss_delimit_quote_single_s.string[0] : f_fss_delimit_quote_double_s.string[0]; - destination->string[destination->used++] = quote ? f_fss_delimit_quote_single_s.string[0] : f_fss_delimit_quote_double_s.string[0]; + destination->string[destination->used++] = quote ? quote : f_fss_delimit_quote_double_s.string[0]; + destination->string[destination->used++] = quote ? quote : f_fss_delimit_quote_double_s.string[0]; } if (complete == f_fss_complete_partial_e || complete == f_fss_complete_partial_trim_e || complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e) {