]> git.sesse.net Git - stockfish/commit
Fix an overflow bug in pawns stormValue
authorMarco Costalba <mcostalba@gmail.com>
Sun, 15 Mar 2009 17:06:40 +0000 (18:06 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 15 Mar 2009 17:18:56 +0000 (18:18 +0100)
commitfcecc5212e42794cba218fc1ffd39cd9da818655
treec673ca1da47982159446d2c3159a0bd851dd5682
parent8de91be61e0910936e3d6be6e1033a4fb8537dca
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>
src/pawns.h