From 5e1877740c696678c24b08ae6e28be0653c65bec Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 24 Jan 2016 19:20:46 +0100 Subject: [PATCH] Fix a bug with formatting pawn captures that result in promotion. --- Board.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Board.pm b/Board.pm index 2950e35..3e0fd33 100644 --- a/Board.pm +++ b/Board.pm @@ -541,12 +541,12 @@ sub _prettyprint_move_no_check_or_mate { $pretty = substr($move, 0, 1) . 'x' . _pos_to_square($to_row, $to_col); } else { $pretty = _pos_to_square($to_row, $to_col); + } - if (defined($promo) && $promo ne '') { - # promotion - $pretty .= "="; - $pretty .= uc($promo); - } + if (defined($promo) && $promo ne '') { + # promotion + $pretty .= "="; + $pretty .= uc($promo); } return $pretty; } -- 2.39.2