Skip to content

Commit 817ca18

Browse files
committed
Fix potential overflow
1 parent 8df1720 commit 817ca18

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/search.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -643,10 +643,10 @@ namespace {
643643
&& !ss->skipNullMove
644644
&& depth < 4 * ONE_PLY
645645
&& !inCheck
646-
&& eval - FutilityMargins[depth][(ss-1)->futMc] >= beta
646+
&& eval - futility_margin(depth, (ss-1)->futMc) >= beta
647647
&& abs(beta) < VALUE_MATE_IN_MAX_PLY
648648
&& pos.non_pawn_material(pos.side_to_move()))
649-
return eval - FutilityMargins[depth][(ss-1)->futMc];
649+
return eval - futility_margin(depth, (ss-1)->futMc);
650650

651651
// Step 8. Null move search with verification search (is omitted in PV nodes)
652652
if ( !PvNode

0 commit comments

Comments
 (0)