X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fhistory.h;fp=src%2Fhistory.h;h=bbac390375100e125106d40dbeebee86c0225b73;hp=c01893321dd63a33cd9aa4abfa0e1804caa7de2e;hb=998845763ae98fac86dc75238e8a441aac14da23;hpb=842efefcad9c6100d0376e20c59264852d225920 diff --git a/src/history.h b/src/history.h index c0189332..bbac3903 100644 --- a/src/history.h +++ b/src/history.h @@ -62,7 +62,7 @@ inline Value History::value(Piece p, Square to) const { } inline void History::update(Piece p, Square to, Value bonus) { - if (abs(history[p][to]) < MaxValue) history[p][to] += bonus; + if (abs(history[p][to] + bonus) < MaxValue) history[p][to] += bonus; } inline Value History::gain(Piece p, Square to) const {