Skip to content

Commit

Permalink
Forgot to add this check to the config file.
Browse files Browse the repository at this point in the history
  • Loading branch information
oshaboy committed Jan 20, 2025
1 parent 7382561 commit 20e3839
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions configuration.c
Original file line number Diff line number Diff line change
Expand Up @@ -6705,10 +6705,12 @@ unsigned input_config_parse_sensor(
if (config_get_array(conf, s, tmp, sizeof(tmp)))
{
if (strcmp(tmp, "nul") != 0){
if (strcmp(tmp+1,"inv") == 0)
return (((*tmp)-0x30)*2)+1;
else if (tmp[1] == '\0')
return ((*tmp)-0x30)*2;
if (*tmp>='0' && *tmp<='5'){
if (strcmp(tmp+1,"inv") == 0)
return (((*tmp)-'0')*2)+1;
else if (tmp[1] == '\0')
return ((*tmp)-'0')*2;
}
}
}
return id*2;
Expand Down

0 comments on commit 20e3839

Please sign in to comment.