From f666d1ea05c842a78d041c77935d160b91a0f559 Mon Sep 17 00:00:00 2001 From: rektdie Date: Sun, 20 Jul 2025 12:14:35 +0200 Subject: [PATCH] bugfix: ScoreMove didnt score the passed move, but the last in the ss | bench 2985672 --- source/search.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/search.cpp b/source/search.cpp index 0b29a51..8316fc9 100644 --- a/source/search.cpp +++ b/source/search.cpp @@ -49,8 +49,8 @@ static int ScoreMove(Board &board, Move &move, int ply, SearchContext* ctx) { if (ply > 0) { int prevType = ctx->ss[ply-1].pieceType; int prevTo = ctx->ss[ply-1].moveTo; - int pieceType = ctx->ss[ply].pieceType; - int to = ctx->ss[ply].moveTo; + int pieceType = board.GetPieceType(move.MoveFrom()); + int to = move.MoveTo(); conthistScore = ctx->conthist[board.sideToMove][prevType][prevTo][pieceType][to]; }