diff options
author | hubertf <hubertf@NetBSD.org> | 1999-07-26 20:50:44 +0000 |
---|---|---|
committer | hubertf <hubertf@NetBSD.org> | 1999-07-26 20:50:44 +0000 |
commit | 7ae31d57ebb4be2558b6fb755d730c1f05a73845 (patch) | |
tree | ba10d6c3b19968bdbe9d3745a35b138a824af11f /backgammon/common_source/subs.c | |
parent | d555b76869e0798676e92a18ec773fdfdc54ba1f (diff) | |
download | bsdgames-darwin-7ae31d57ebb4be2558b6fb755d730c1f05a73845.tar.gz bsdgames-darwin-7ae31d57ebb4be2558b6fb755d730c1f05a73845.tar.zst bsdgames-darwin-7ae31d57ebb4be2558b6fb755d730c1f05a73845.zip |
This patch makes backgammon(6) check that, if you use the -s option to
recover a saved game, then you specify a file name.
Patch submitted in PR 8081 by Joseph Myers <jsm28@cam.ac.uk>
Diffstat (limited to 'backgammon/common_source/subs.c')
-rw-r--r-- | backgammon/common_source/subs.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/backgammon/common_source/subs.c b/backgammon/common_source/subs.c index 29baf64c..6552e0f6 100644 --- a/backgammon/common_source/subs.c +++ b/backgammon/common_source/subs.c @@ -1,4 +1,4 @@ -/* $NetBSD: subs.c,v 1.10 1999/02/10 12:29:48 hubertf Exp $ */ +/* $NetBSD: subs.c,v 1.11 1999/07/26 20:50:44 hubertf Exp $ */ /* * Copyright (c) 1980, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)subs.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: subs.c,v 1.10 1999/02/10 12:29:48 hubertf Exp $"); +__RCSID("$NetBSD: subs.c,v 1.11 1999/07/26 20:50:44 hubertf Exp $"); #endif #endif /* not lint */ @@ -388,7 +388,11 @@ getarg(arg) 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++; |