Module Name:    src
Committed By:   dholland
Date:           Sun Jun 12 02:15:26 UTC 2016

Modified Files:
        src/games/gomoku: main.c

Log Message:
Fix the out-of-memory behavior so the message doesn't disappear under
endwin(). Related to PR 3126.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/games/gomoku/main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/games/gomoku/main.c
diff -u src/games/gomoku/main.c:1.26 src/games/gomoku/main.c:1.27
--- src/games/gomoku/main.c:1.26	Tue Aug 16 11:10:54 2011
+++ src/games/gomoku/main.c	Sun Jun 12 02:15:26 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.26 2011/08/16 11:10:54 christos Exp $	*/
+/*	$NetBSD: main.c,v 1.27 2016/06/12 02:15:26 dholland Exp $	*/
 
 /*
  * Copyright (c) 1994
@@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1994\
 #if 0
 static char sccsid[] = "@(#)main.c	8.4 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: main.c,v 1.26 2011/08/16 11:10:54 christos Exp $");
+__RCSID("$NetBSD: main.c,v 1.27 2016/06/12 02:15:26 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -562,12 +562,17 @@ panic(const char *fmt, ...)
 {
 	va_list ap;
 
+	if (interactive) {
+		bdisp();
+		cursfini();
+	}
+
 	fprintf(stderr, "%s: ", prog);
 	va_start(ap, fmt);
 	vfprintf(stderr, fmt, ap);
 	va_end(ap);
 	fprintf(stderr, "\n");
 
-	fputs("resign\n", stdout);
-	quit();
+	fputs("I resign\n", stdout);
+	exit(1);
 }

Reply via email to