From fdab071377d12dcb18da712b3641b33f1661f31c Mon Sep 17 00:00:00 2001 From: Jean-loup Gailly Date: Sat, 5 Feb 2011 19:27:40 +0100 Subject: [PATCH] board_effective_handicap(): Take komi into account when no handicap This is a fix for 3679219, pointed out by pasky. --- tactics/util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tactics/util.c b/tactics/util.c index 97066f9..80ef247 100644 --- a/tactics/util.c +++ b/tactics/util.c @@ -94,7 +94,8 @@ board_effective_handicap(struct board *b, int first_move_value) /* Always return 0 for even games, in particular if * first_move_value is set on purpose to a value different * from the correct theoretical value (2*komi). */ - if (!b->handicap) return 0; + if (!b->handicap) + return 7.5 - b->komi; return b->handicap * first_move_value + 0.5 - b->komi; } -- 2.11.4.GIT