diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2023-05-15 18:51:24 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2023-05-15 19:02:11 -0700 |
commit | b07dcecc6ae6abdc9ff7fab0179475903740ce43 (patch) | |
tree | 3374535ff75923b178262454798e3b9bd48eca2b /src | |
parent | 0cf75082527cca1b69c7a64f5ce599afeb8b1e44 (diff) |
til: fix til_setup_module() skip-experimental bug
Commit d72e924a introduced skipping experimental modules for the
values, but it didn't bring in a new index for storing the values
so the offset w/skips was being used to store the values too.
This created a sparse set of values for the setup, manifesting as
a wonky partial interactive setup for the module that didn't even
include the default 0 (rtv) value in the list.
Simple fix.
Diffstat (limited to 'src')
-rw-r--r-- | src/til.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -278,12 +278,13 @@ int til_module_setup(const til_settings_t *settings, til_setting_t **res_setting til_setting_desc_t *desc; int r; - for (unsigned i = 0; i < nelems(modules); i++) { + for (unsigned i = 0, j = 0; i < nelems(modules); i++) { if ((modules[i]->flags & TIL_MODULE_EXPERIMENTAL)) continue; - values[i] = modules[i]->name; - annotations[i] = modules[i]->description; + values[j] = modules[i]->name; + annotations[j] = modules[i]->description; + j++; } r = til_setting_desc_new( settings, |