chmode: sscanf(3) returns the number of items matched, so might as well use it
This commit is contained in:
parent
90552e214c
commit
2daf18131c
1 changed files with 2 additions and 1 deletions
|
@ -1163,7 +1163,8 @@ chm_throttle(struct Client *source_p, struct Channel *chptr,
|
|||
|
||||
if((dir == MODE_ADD) && parc > *parn)
|
||||
{
|
||||
sscanf(parv[(*parn)], "%d:%d", &joins, ×lice);
|
||||
if (sscanf(parv[(*parn)], "%d:%d", &joins, ×lice) < 2)
|
||||
return;
|
||||
|
||||
if(joins <= 0 || timeslice <= 0)
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue