From 83ef8668ba86643e67f5dedf62fe53bbd43cd0a2 Mon Sep 17 00:00:00 2001 From: Andrey Sofronov Date: Thu, 11 Feb 2010 10:35:14 +0200 Subject: [PATCH] Fixed bug in mate detection (introduced after switching to fail had) --- zwsearch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zwsearch.c b/zwsearch.c index 73ae37d..2664666 100644 --- a/zwsearch.c +++ b/zwsearch.c @@ -220,7 +220,7 @@ zwsearch(int beta, int depth, int ply, int check) } } if (!moves_count) - beta = check? -MATE_VALUE + ply : 0 + 1; + beta = check? -MATE_VALUE + ply + 1 : 1; if (e.main_hash_enabled) /* save in hashtable */ -- 2.11.4.GIT