]> Kevux Git Server - fll/commitdiff
Bugfix: FSS write functions should use 'quote' when passed rather than f_fss_delimit_...
authorKevin Day <thekevinday@gmail.com>
Sat, 10 Dec 2022 16:56:50 +0000 (10:56 -0600)
committerKevin Day <thekevinday@gmail.com>
Sat, 10 Dec 2022 16:56:50 +0000 (10:56 -0600)
level_1/fl_fss/c/fss/basic.c
level_1/fl_fss/c/fss/extended.c

index e82e4103f5f4f7b7efbf575dd462ab332b9abed3..23493a10f4b29b85cf49c7a61f4b0ad0c1fb7468 100644 (file)
@@ -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) {
index 56d5a17ae035c7f7f96f4169c830ae2332be9628..09d53b8c76a67f7536270412f5c44d33835615cc 100644 (file)
@@ -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) {