diff options
Diffstat (limited to 'games/crafty/patches/patch-ad')
-rw-r--r-- | games/crafty/patches/patch-ad | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/games/crafty/patches/patch-ad b/games/crafty/patches/patch-ad index 30600a7e84f..1f3c0e8263e 100644 --- a/games/crafty/patches/patch-ad +++ b/games/crafty/patches/patch-ad @@ -1,8 +1,34 @@ -$NetBSD: patch-ad,v 1.3 2008/08/17 21:00:20 dholland Exp $ +$NetBSD: patch-ad,v 1.4 2009/08/03 13:18:37 joerg Exp $ ---- utility.c.orig 2008-04-15 18:41:49.000000000 -0400 -+++ utility.c 2008-08-17 16:41:20.000000000 -0400 -@@ -2788,6 +2788,15 @@ +--- utility.c.orig 2008-04-16 00:41:49.000000000 +0200 ++++ utility.c +@@ -388,8 +388,10 @@ void ClearHashTableScores(void) + */ + void CraftyExit(int exit_type) + { +- shared->abort_search = 1; +- shared->quit = 1; ++ if (shared) { ++ shared->abort_search = 1; ++ shared->quit = 1; ++ } + exit(exit_type); + } + +@@ -1541,10 +1543,10 @@ void Print(int vb, char *fmt, ...) + va_list ap; + + va_start(ap, fmt); +- if (vb & shared->display_options) ++ if (shared == NULL || (vb & shared->display_options)) + vprintf(fmt, ap); + fflush(stdout); +- if (shared->time_limit > 99 || shared->tc_time_remaining > 6000 || vb == 4095) { ++ if (vb == 4095 || shared->time_limit > 99 || shared->tc_time_remaining > 6000) { + va_start(ap, fmt); + if (log_file) + vfprintf(log_file, fmt, ap); +@@ -2788,6 +2790,15 @@ void *SharedMalloc(size_t size, int tid) #if defined(UNIX) int shmid; void *shared; |