Skip to content

Commit

Permalink
fix the value check don't write 0 to dmx variables
Browse files Browse the repository at this point in the history
Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>
  • Loading branch information
Xiangfu Liu committed Dec 6, 2011
1 parent 567aca1 commit 77a79b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/dmx.c
Expand Up @@ -91,15 +91,15 @@ static void set_config()
sprintf(confname, "e_idmx%d.text", i);
value = mtk_req_i(appid, confname);
if((value < 1) || (value > 512))
value = i;
value = i+1;
sprintf(confname, "idmx%d", i+1);
config_write_int(confname, value);
}
for(i=0;i<DMX_COUNT;i++) {
sprintf(confname, "e_dmx%d.text", i);
value = mtk_req_i(appid, confname);
if((value < 1) || (value > 512))
value = i;
value = i+1;
sprintf(confname, "dmx%d", i+1);
config_write_int(confname, value);
}
Expand Down

0 comments on commit 77a79b5

Please sign in to comment.