Bug 21133

Summary: sail driver dies
Product: Base System Reporter: jtm63 <jtm63>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 3.5-STABLE   
Hardware: Any   
OS: Any   

Description jtm63 2000-09-08 22:20:01 UTC
	The following error occurs while playing sail
	right at atartup.

	It looks like you've had it!
The driver died.
Comment 1 Peter Wemm freebsd_committer freebsd_triage 2000-09-25 20:21:35 UTC
Responsible Changed
From-To: gnats-admin->freebsd-bugs

Orphaned PR
Comment 2 Mike Heffner freebsd_committer freebsd_triage 2001-06-23 06:53:10 UTC
State Changed
From-To: open->closed

I can't reproduce this. If there is still a problem, a lot more 
details are going to be needed.
Comment 3 siramoto 2001-09-15 19:11:43 UTC
diff -crN /usr/src/games/sail/pl_main.c ./pl_main.c
*** /usr/src/games/sail/pl_main.c	Tue Nov 30 12:49:38 1999
--- ./pl_main.c	Sun Sep 16 01:08:21 2001
***************
*** 49,58 ****
  pl_main()
  {
  
- 	if (!SCREENTEST()) {
- 		printf("Can't sail on this terminal.\n");
- 		exit(1);
- 	}
  	initialize();
  	Signal("Aye aye, Sir", (struct ship *)0);
  	play();
--- 49,54 ----
***************
*** 200,208 ****
--- 196,208 ----
  	if ((nameptr = (char *) getenv("SAILNAME")) && *nameptr)
  		(void) strncpy(captain, nameptr, sizeof captain);
  	else {
+ 		char *p;
+ 
  		(void) printf("Your name, Captain? ");
  		(void) fflush(stdout);
  		(void) fgets(captain, sizeof captain, stdin);
+ 		p = captain;
+ 		strsep(&p, "\n\r");
  		if (!*captain)
  			(void) strcpy(captain, "no name");
  		else
***************
*** 241,246 ****
--- 241,250 ----
  		}
  	}
  
+ 	if (!SCREENTEST()) {
+ 		printf("Can't sail on this terminal.\n");
+ 		exit(1);
+ 	}
  	initscreen();
  	draw_board();
  	(void) sprintf(message, "Captain %s assuming command", captain);