1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 16:53:09 +00:00

Fix potential overflow

This commit is contained in:
Joona Kiiski 2013-04-23 07:26:36 +01:00
parent 8df17204f4
commit 817ca1820b

View file

@ -643,10 +643,10 @@ namespace {
&& !ss->skipNullMove && !ss->skipNullMove
&& depth < 4 * ONE_PLY && depth < 4 * ONE_PLY
&& !inCheck && !inCheck
&& eval - FutilityMargins[depth][(ss-1)->futMc] >= beta && eval - futility_margin(depth, (ss-1)->futMc) >= beta
&& abs(beta) < VALUE_MATE_IN_MAX_PLY && abs(beta) < VALUE_MATE_IN_MAX_PLY
&& pos.non_pawn_material(pos.side_to_move())) && pos.non_pawn_material(pos.side_to_move()))
return eval - FutilityMargins[depth][(ss-1)->futMc]; return eval - futility_margin(depth, (ss-1)->futMc);
// Step 8. Null move search with verification search (is omitted in PV nodes) // Step 8. Null move search with verification search (is omitted in PV nodes)
if ( !PvNode if ( !PvNode