summaryrefslogtreecommitdiffstats
path: root/mille
diff options
context:
space:
mode:
authordrochner <drochner@NetBSD.org>2008-08-08 16:10:47 +0000
committerdrochner <drochner@NetBSD.org>2008-08-08 16:10:47 +0000
commit8218dc5ff267a1066f10d1dc24a259770c7e1257 (patch)
tree0cb722dff6cd475d71113cb6ee9ef928f9ee3b17 /mille
parent4ca7662068dbec217082e73d01ea38705f82833b (diff)
downloadbsdgames-darwin-8218dc5ff267a1066f10d1dc24a259770c7e1257.tar.gz
bsdgames-darwin-8218dc5ff267a1066f10d1dc24a259770c7e1257.tar.zst
bsdgames-darwin-8218dc5ff267a1066f10d1dc24a259770c7e1257.zip
if initscr() fails, exit with a message rather than crash in the
next curses call
Diffstat (limited to 'mille')
-rw-r--r--mille/mille.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/mille/mille.c b/mille/mille.c
index 62a45586..293b7491 100644
--- a/mille/mille.c
+++ b/mille/mille.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mille.c,v 1.15 2008/07/20 01:03:21 lukem Exp $ */
+/* $NetBSD: mille.c,v 1.16 2008/08/08 16:10:47 drochner Exp $ */
/*
* Copyright (c) 1982, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1982, 1993\
#if 0
static char sccsid[] = "@(#)mille.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: mille.c,v 1.15 2008/07/20 01:03:21 lukem Exp $");
+__RCSID("$NetBSD: mille.c,v 1.16 2008/08/08 16:10:47 drochner Exp $");
#endif
#endif /* not lint */
@@ -78,7 +78,8 @@ main(ac, av)
/* NOTREACHED */
}
Play = PLAYER;
- initscr();
+ if (!initscr())
+ errx(0, "couldn't initialize screen");
delwin(stdscr);
stdscr = Board = newwin(BOARD_Y, BOARD_X, 0, 0);
Score = newwin(SCORE_Y, SCORE_X, 0, 40);