Fix input validation for time
Some checks failed
Create Release on Push / build_and_release_linux (push) Has been cancelled
Create Release on Push / build_and_upload_windows (push) Has been cancelled

This commit is contained in:
lily 2026-01-28 19:50:55 +11:00
parent 34169274f4
commit e756cede3a
No known key found for this signature in database
GPG key ID: 6A91E98FC1591F03

View file

@ -85,6 +85,10 @@ int main(void) {
int playtime;
printf ("\nHow long would you like to play for? Answer in seconds.\n");
scanf ("%d", &playtime);
if (playtime < 1) {
printf ("Error! You must select at least one second.\n");
exit(1);
}
int number_length;
printf ("Please enter maximum possible number\n");