]> Kevux Git Server - fll/commitdiff
Bugfix: Wrong index is being used for the file in Featureless Make.
authorKevin Day <kevin@kevux.org>
Mon, 7 Aug 2023 16:30:12 +0000 (11:30 -0500)
committerKevin Day <kevin@kevux.org>
Mon, 7 Aug 2023 16:30:12 +0000 (11:30 -0500)
The values array should be used and not the location of the parameter.

level_3/fake/c/main/fake.c

index 7cd4659c21df58649fe5df61705a580479fa0557..fdb9aa54c858dc24fa45afa0f9a9bc3bddf589cf 100644 (file)
@@ -454,7 +454,7 @@ extern "C" {
         ];
 
       if (parameter->result & f_console_result_value_e) {
-        const f_number_unsigned_t index = parameter->values.array[parameter->location];
+        const f_number_unsigned_t index = parameter->values.array[parameter->values.used - 1];
 
         // @fixme these should not be accessing main->program.parameters.arguments directly and should instead use setting flags.
         if (f_path_is_absolute(main->program.parameters.arguments.array[index]) == F_true || f_path_is_relative_current(main->program.parameters.arguments.array[index]) == F_true) {