From a88c257d6a4644949cb640729c9dd19609353060 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sat, 10 Dec 2022 10:56:50 -0600 Subject: [PATCH] Bugfix: FSS write functions should use 'quote' when passed rather than f_fss_delimit_quote_single_s. --- level_1/fl_fss/c/fss/basic.c | 4 ++-- level_1/fl_fss/c/fss/extended.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) 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) { -- 1.8.3.1