diff --git a/games/sail/pl_main.c b/games/sail/pl_main.c index 7b1f457662c7..e9213210d38c 100644 --- a/games/sail/pl_main.c +++ b/games/sail/pl_main.c @@ -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"); }