referencing value fix

This commit is contained in:
Koby Samuel 2020-10-19 14:39:27 -04:00 committed by Eyal Sawady
parent 5af8c9ae24
commit 385bae9c74
No known key found for this signature in database
GPG Key ID: 604D3459E53A9952
1 changed files with 1 additions and 1 deletions

2
main.c
View File

@ -703,7 +703,7 @@ not_yet:
} }
char *endptr = NULL; char *endptr = NULL;
vote = strtol(input[6], &endptr, 10); vote = strtol(&input[6], &endptr, 10);
if (!endptr || endptr[0] != '\0') { if (!endptr || endptr[0] != '\0') {
snprintf(buf, sizeof(buf), "Invalid kick, not an integer\n"); snprintf(buf, sizeof(buf), "Invalid kick, not an integer\n");
write(players[pid].fd, buf, strlen(buf)); write(players[pid].fd, buf, strlen(buf));