]> git.sesse.net Git - stockfish/commitdiff
Fix a series of undefined behaviours
authorJoost Vandevondele <Joost.VandeVondele@gmail.com>
Fri, 21 Oct 2016 04:48:07 +0000 (06:48 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Thu, 27 Oct 2016 04:44:41 +0000 (06:44 +0200)
Avoid shifting negative signed integers and use typed
enum to avoids decrementing a variable beyond its defined
range, like:
       for (Rank r = RANK_8; r >= RANK_1; --r)

Changes were tested individually and passed SPRT[-3, 1].

With this patch gcc --sanitize builds cleanly.

No functional change.


No differences found