X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmaterial.cpp;h=27a88f86e67527c5d8851af6d4af9fb5583183cd;hp=6171c70a9ab62c38b7df4ae316755bbafd0dea07;hb=96213689e40c722b9d34edf9d58837c47f7b00e7;hpb=5c8af7ccb8f59f901740d5a8f4a9270f69487583 diff --git a/src/material.cpp b/src/material.cpp index 6171c70a..27a88f86 100644 --- a/src/material.cpp +++ b/src/material.cpp @@ -143,7 +143,7 @@ MaterialInfo* MaterialInfoTable::get_material_info(const Position& pos) const { if ( pos.piece_count(WHITE, BISHOP) + pos.piece_count(WHITE, KNIGHT) <= 2 && pos.piece_count(BLACK, BISHOP) + pos.piece_count(BLACK, KNIGHT) <= 2) { - mi->evaluationFunction = &EvaluateKmmKm[WHITE]; + mi->evaluationFunction = &EvaluateKmmKm[pos.side_to_move()]; return mi; } }