I'm trying to read a bool setting from a group. I'm using the following code, but config_lookup_bool
always returns CONFIG_FALSE. As far as I understood it should write the value into send_keys
and return CONFIG_TRUE instead.
Code:
int send_keys;
config_t cfg;
config_init(&cfg);
config_read_file(&cfg, "config.cfg")
if (config_lookup_bool(&cfg, "settings.send_keys", &send_keys))
{
// do something here
}
config.cfg:
settings :
{
send_keys = "true";
start_apps = "false";
sync_clocks = "false";
pc_clock_is_origin = "true";
calibration_start_time = 0L;
};
Is there any mistake in my code or my thoughts?