mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-26 20:16:14 +08:00
Fix an overflow bug in pawns stormValue
These fields are defined as int8_t but values bigger then 127 are stored there so that we silently overflow. Fix bringing up all the fields to a sane int type. This will increase memory usage, but apart from being safe, it is not clear if code is slower or faster. Test is needed. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -58,9 +58,9 @@ private:
|
|||||||
|
|
||||||
Key key;
|
Key key;
|
||||||
Bitboard passedPawns;
|
Bitboard passedPawns;
|
||||||
int16_t mgValue, egValue;
|
int mgValue, egValue;
|
||||||
int8_t ksStormValue[2], qsStormValue[2];
|
int ksStormValue[2], qsStormValue[2];
|
||||||
uint8_t halfOpenFiles[2];
|
int halfOpenFiles[2];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user