summaryrefslogtreecommitdiff
path: root/test/read_conf.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'test/read_conf.cxx')
-rw-r--r--test/read_conf.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/read_conf.cxx b/test/read_conf.cxx
index a9135d892..8759398da 100644
--- a/test/read_conf.cxx
+++ b/test/read_conf.cxx
@@ -57,7 +57,10 @@ int main(int argc, char **argv)
return 1;
}
- const char *value = config_get_string(name, NULL);
+ ConfigOption option = ParseConfigOptionName(name);
+ const char *value = option != CONF_MAX
+ ? config_get_string(option, nullptr)
+ : nullptr;
int ret;
if (value != NULL) {
g_print("%s\n", value);