projects
/
fairystockfish.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
b9663b1
)
Fix undefined behavior for large-board variants
author
Fabian Fichter
<ianfab@users.noreply.github.com>
Wed, 23 Dec 2020 10:50:49 +0000 (11:50 +0100)
committer
Fabian Fichter
<ianfab@users.noreply.github.com>
Wed, 23 Dec 2020 10:50:49 +0000 (11:50 +0100)
Partly addresses #213.
src/evaluate.cpp
patch
|
blob
|
history
diff --git
a/src/evaluate.cpp
b/src/evaluate.cpp
index
8b16477
..
98b2145
100644
(file)
--- a/
src/evaluate.cpp
+++ b/
src/evaluate.cpp
@@
-550,7
+550,7
@@
namespace {
// when the bishop is outside the pawn chain.
Bitboard blocked = pos.pieces(Us, PAWN) & shift<Down>(pos.pieces());
- score -= BishopPawns[edge_distance(file_of(s))] * pos.pawns_on_same_color_squares(Us, s)
+ score -= BishopPawns[edge_distance(file_of(s), pos.max_file())] * pos.pawns_on_same_color_squares(Us, s)
* (!(attackedBy[Us][PAWN] & s) + popcount(blocked & CenterFiles));
// Penalty for all enemy pawns x-rayed