From bcf30987618488ae4b9e35ea1a4c300aa4cfe286 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Sun, 8 Mar 2015 17:46:08 +0100 Subject: [PATCH] Fix probing of GUI book for board with more than 10 ranks The move-to-text code was not yet adapted to the convention that rank counting only starts at 0 for boards of exactly 10 ranks. --- book.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/book.c b/book.c index caa61b1..c52e6e3 100644 --- a/book.c +++ b/book.c @@ -500,9 +500,9 @@ move_to_string (char move_s[6], uint16 move) tr = t / width; tf = t % width; move_s[0] = ff + 'a'; - move_s[1] = fr + '1' - (BOARD_HEIGHT > 9); + move_s[1] = fr + '1' - (BOARD_HEIGHT == 10); move_s[2] = tf + 'a'; - move_s[3] = tr + '1' - (BOARD_HEIGHT > 9); + move_s[3] = tr + '1' - (BOARD_HEIGHT == 10); if(IS_SHOGI(gameInfo.variant) && p) { if(p == 2) p = 10; // Lion moves, for boards so big that 10 is out of range -- 1.7.0.4