Subject: bin/8081: [PATCH] Backgammon bug fix
To: None <gnats-bugs@gnats.netbsd.org>
From: Joseph Myers <jsm28@cam.ac.uk>
List: netbsd-bugs
Date: 07/26/1999 11:15:07
>Number: 8081
>Category: bin
>Synopsis: [PATCH] Backgammon bug fix
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Mon Jul 26 10:20:02 1999
>Last-Modified:
>Originator: Joseph S. Myers
>Organization:
Trinity College, University of Cambridge, UK
>Release: NetBSD anoncvs of 1999-07-25
>Environment:
[
System: Linux decomino 2.2.10 #1 Mon Jun 14 07:48:53 UTC 1999 i686 unknown
Architecture: i686
]
>Description:
This patch makes backgammon(6) check that, if you use the -s option to
recover a saved game, then you specify a file name.
>How-To-Repeat:
>Fix:
diff -ruN backgammon/common_source/subs.c backgammon+/common_source/subs.c
--- backgammon/common_source/subs.c Wed Feb 10 12:29:48 1999
+++ backgammon+/common_source/subs.c Mon Jul 26 16:31:42 1999
@@ -388,7 +388,11 @@
case 's':
s++;
/* recover file */
- recover(s[0]);
+ if (s[0] == NULL) {
+ writel("No save file named\n");
+ getout(0);
+ } else
+ recover(s[0]);
break;
}
s++;
>Audit-Trail:
>Unformatted: