Skip to content

Commit

Permalink
Fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
jesperpedersen committed May 24, 2022
1 parent c9e692d commit 7e9e5c6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,11 @@ main(int argc, char** argv)
printf("User name: ");

memset(&un, 0, sizeof(un));
fgets(&un[0], sizeof(un), stdin);
if (fgets(&un[0], sizeof(un), stdin) == NULL)
{
exit_code = 1;
goto done;
}
un[strlen(un) - 1] = 0;
username = &un[0];
}
Expand Down

0 comments on commit 7e9e5c6

Please sign in to comment.