From 7ae31d57ebb4be2558b6fb755d730c1f05a73845 Mon Sep 17 00:00:00 2001 From: hubertf Date: Mon, 26 Jul 1999 20:50:44 +0000 Subject: [PATCH] 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 --- backgammon/common_source/subs.c | 10 +++++++--- 1 file 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++; -- 2.47.1