]> Kevux Git Server - fll/commitdiff
Bugfix: Fakefile processing with color context is producing extra spaces when unquoted.
authorKevin Day <kevin@kevux.org>
Tue, 24 Jan 2023 05:32:01 +0000 (23:32 -0600)
committerKevin Day <kevin@kevux.org>
Tue, 24 Jan 2023 05:32:01 +0000 (23:32 -0600)
Do not generate a new argument when calling fake_make_operate_expand_context().
The color context should combine with existing arguments.
This does not handle the last context argument and more work is likely needed to handle that one.

Remove the not quoted check that always generates a new argument.

level_3/fake/c/private-make-operate.c

index 22a629c411a16cb2c55efcf0ea0bdac45d222f94..525e4e91f0bc0384a4e02e50a85f89f613251256 100644 (file)
@@ -615,7 +615,6 @@ extern "C" {
 
                         break;
                       }
-
                     }
 
                     *status = f_string_dynamic_append_nulless(reserved_value[k]->array[l], &data_make->cache_arguments.array[data_make->cache_arguments.used]);
@@ -780,7 +779,7 @@ extern "C" {
           }
         }
 
-        if (!(content.array[i].start == iki_data->variable.array[0].start && content.array[i].stop == iki_data->variable.array[0].stop && !quotes.array[i]) || !quotes.array[i] || i + 1 == content.used) {
+        if (!(content.array[i].start == iki_data->variable.array[0].start && content.array[i].stop == iki_data->variable.array[0].stop && !quotes.array[i]) || i + 1 == content.used) {
           ++data_make->cache_arguments.used;
 
           *status = f_string_dynamics_increase(fake_default_allocation_small_d, &data_make->cache_arguments);
@@ -1168,10 +1167,6 @@ extern "C" {
 
         if (F_status_is_error_not(status)) {
           status = f_string_dynamic_append_nulless(*context, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
-
-          if (F_status_is_error_not(status)) {
-            ++data_make->cache_arguments.used;
-          }
         }
       }