From c3bb0621c31a83e400319d975a0a6ef8e8c411f3 Mon Sep 17 00:00:00 2001 From: Quinn Date: Fri, 13 Jun 2025 01:22:28 +0200 Subject: [PATCH] fix: wasn't handling floating-point numbers as output --- src/util/conf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util/conf.c b/src/util/conf.c index 52b84db..575c31e 100644 --- a/src/util/conf.c +++ b/src/util/conf.c @@ -121,7 +121,9 @@ int conf_procval(struct conf_entry const* opt, char const* restrict val) { case CONF_I32: *(int32_t*)opt->out = *(int32_t*)dat; return 0; case CONF_U64: case CONF_I64: *(int64_t*)opt->out = *(int64_t*)dat; return 0; - default: abort(); // abort; this shouldn't be possible, so I blame the programmer + case CONF_F32: *(float*)opt->out = *(float*)dat; return 0; + case CONF_F64: *(double*)opt->out = *(double*)dat; return 0; + default: fatal("invalid switch state, all cases should be handled already"); // abort; this shouldn't be possible, so I blame the programmer } }