summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-08-05 12:52:20 -0700
committerVito Caputo <vcaputo@pengaru.com>2023-08-05 12:52:20 -0700
commitb212a43bb2d4eed6780cc93394fa566a09018a68 (patch)
tree6666ac71eaa1edaf7e7c07cc521f5e2c293b7c00 /src
parentb80c4aa12eb9e0c5042872a2717a65b2d5483791 (diff)
til: use set_raw_value() in randomize_setup() overrides
Missed this in the last round of moving things to the new raw_value() setter/getter api This snippet of copy-n-pasta the few setup front-ends continue to have should really be factored out into a libtil helper
Diffstat (limited to 'src')
-rw-r--r--src/til.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/til.c b/src/til.c
index ea1e5fb..4fa42dd 100644
--- a/src/til.c
+++ b/src/til.c
@@ -539,8 +539,10 @@ int til_module_setup_randomize(const til_module_t *module, til_settings_t *setti
return -ENOMEM;
if (o != setting->value) {
- free((void *)setting->value);
- setting->value = o;
+ r = til_setting_set_raw_value(setting, o);
+ free((void *)o);
+ if (r < 0)
+ return -ENOMEM;
}
}
© All Rights Reserved