1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-05-02 09:39:36 +00:00

Fix a serious bug in TranspositionTable::retrieve()

Reported by Tord Romstad.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba 2008-11-03 19:59:58 +01:00
parent 046fd4926f
commit ff0d9dad2b

View file

@ -144,9 +144,8 @@ const TTEntry* TranspositionTable::retrieve(const Position &pos) const {
TTEntry *tte = first_entry(pos); TTEntry *tte = first_entry(pos);
for (int i = 0; i < 4; i++) for (int i = 0; i < 4; i++, tte++)
{ {
tte += i;
if (tte->key() == pos.get_key()) if (tte->key() == pos.get_key())
return tte; return tte;
} }