Skip to content

Commit 61e3d6d

Browse files
fix: mult overflow error with hist bonus
bench: 2517656
1 parent 7cfe344 commit 61e3d6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

engine/src/search.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ impl<'a> Search<'a> {
479479
// update history table for quiets
480480
if mv.is_quiet() {
481481
// calculate history bonus
482-
let bonus = 300 * depth - 250;
482+
let bonus = depth.wrapping_mul(300) - 250;
483483
self.history_table.update(
484484
board.side_to_move(),
485485
mv.piece(),

0 commit comments

Comments
 (0)