gets -> fgets

Submitted by:	fn@@pain.csrv.uidaho.edu
This commit is contained in:
Dima Ruban 1995-12-27 19:29:59 +00:00
parent 014374187c
commit 9f234b3662

View File

@ -198,7 +198,7 @@ reprint:
else {
(void) printf("Your name, Captain? ");
(void) fflush(stdout);
(void) gets(captain);
(void) fgets(captain, sizeof captain, stdin);
if (!*captain)
(void) strcpy(captain, "no name");
}