Files
Stockfish/src
Marco Costalba 22a5f91aa7 Fix crash under Chess 960
We have a crash with this position:

rkqbnnbr/pppppppp/8/8/8/8/PPPPPPPP/RKQBNNBR w HAha -

What happens is that even if we are castling QUEEN_SIDE,
in this case we have kfrom (B8) < kto (C8) so the loop
that checks for attackers runs forever leading to a crash.

The fix is to check for (kto > kfrom) instead of
Side == KING_SIDE, but this is slower in the normal case of
ortodhox chess, so rewrite generate_castle() to handle the
chess960 case as a template parameter and allow the compiler
to optimize out the comparison in case of normal chess.

Reported by Ray Banks.
2012-09-16 14:14:55 +02:00
..
2012-09-14 09:57:13 +02:00
2012-08-18 13:08:12 +01:00
2012-08-18 13:08:12 +01:00
2012-09-16 10:32:57 +02:00
2012-09-16 10:32:57 +02:00
2012-09-16 08:57:26 +02:00
2012-04-02 09:58:29 +01:00
2012-08-20 19:17:58 +01:00
2012-03-07 07:39:01 +01:00
2012-08-20 19:17:58 +01:00
2012-09-15 11:02:08 +02:00
2012-09-04 09:38:51 +02:00
2012-09-16 14:14:55 +02:00
2012-09-09 10:24:40 +02:00
2012-09-09 10:24:40 +02:00
2012-09-14 09:57:13 +02:00
2012-09-14 09:57:13 +02:00
2012-07-08 09:36:40 +01:00
2012-09-15 10:55:39 +02:00
2012-08-20 18:24:06 +01:00
2011-12-30 13:52:16 +01:00
2011-12-30 13:52:16 +01:00
2012-09-16 10:32:57 +02:00
2012-09-04 09:38:51 +02:00
2012-09-02 17:04:22 +02:00
2012-03-27 14:26:58 +01:00
2012-07-08 09:36:40 +01:00
2012-03-31 19:07:11 +01:00
2012-08-20 19:17:58 +01:00
2012-09-15 11:02:08 +02:00
2012-09-15 11:02:08 +02:00
2012-08-18 12:26:22 +01:00