Clipping instead of ignoring for progressbar widget
FS#25
This commit is contained in:
parent
348440bc8e
commit
32163d80e1
|
@ -118,8 +118,7 @@ progressbar_tell(Widget *widget, char *command)
|
|||
for (tok = strtok(command, ","); tok && i < d->bars; tok = strtok(NULL, ","), i++)
|
||||
{
|
||||
percent = atoi(tok);
|
||||
if(percent <= 100 && percent >= 0)
|
||||
d->percent[i] = percent;
|
||||
d->percent[i] = (percent < 0 ? 0 : (percent > 100 ? 100 : percent));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue