]> git.sesse.net Git - stockfish/commit
Fix enum Value issue with gcc 4.4
authorMarco Costalba <mcostalba@gmail.com>
Tue, 19 Jan 2010 22:30:23 +0000 (23:30 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Tue, 19 Jan 2010 22:30:23 +0000 (23:30 +0100)
commit806c1d87233a98d52db16e4633b92884ce68fee9
tree39752e96cc0e13f9185c8d47fa2b5f69016b534f
parenta1b8c8109b464abd9d026b1ef740f1bace814b29
Fix enum Value issue with gcc 4.4

Louis Zulli reports a miscompile with g++-4.4 from MacPorts.

Namely enum Value is compiled as unsigned instead of signed integer
and this yields an issue in score_string() where float(v) is incorrectly
casted when Value v is negative.

This patch ensure that compiler choses a signed variable to store a Value.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/value.h