forked from noisytoot/rubyserv-iirc
Fix missing argc check, fix warning message to contain the right number
This commit is contained in:
parent
c8507f711f
commit
ea9db34ab8
1 changed files with 6 additions and 1 deletions
|
@ -333,6 +333,11 @@ int sh_command(struct string sender, struct string original_message, struct stri
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (argc < 2) {
|
||||
privmsg(STRING("1HC000000"), to, 1, (struct string[]){STRING("Missing args!")});
|
||||
return 0;
|
||||
}
|
||||
|
||||
char wasspace = 1;
|
||||
uint64_t offset = 0;
|
||||
char found = 0;
|
||||
|
@ -347,7 +352,7 @@ int sh_command(struct string sender, struct string original_message, struct stri
|
|||
}
|
||||
|
||||
if (found < 1) {
|
||||
WRITES(2, STRING("WARNING: Apparently there was no third argument... shouldn't happen.\n"));
|
||||
WRITES(2, STRING("WARNING: Apparently there was no argument... shouldn't happen.\n"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue