Put drops start after castlings
authorH.G.Muller <hgm@hgm-xboard.(none)>
Sat, 14 Jan 2017 12:11:54 +0000 (13:11 +0100)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Sat, 14 Jan 2017 12:11:54 +0000 (13:11 +0100)
dropper.c

index bbaf83d..5324fac 100644 (file)
--- a/dropper.c
+++ b/dropper.c
@@ -804,7 +804,6 @@ MoveGen (int stm, MoveStack *m, int castle)
            }
        }
     }
-    m->unsorted = m->firstMove; m->drops = moveSP;
 
     r = location[stm+31]; m->castlings = moveSP; f = 0;
     if(!(stm >> 5 & castle)) { // K-side castling
@@ -825,6 +824,7 @@ MoveGen (int stm, MoveStack *m, int castle)
 #   define ESC(X) (board[X] & stm || attacks[X] == c)
     m->escape = 8 - (ESC(r+1) + ESC(r-1) + ESC(r+22) + ESC(r+21) + ESC(r+23) + ESC(r-21) + ESC(r-22) + ESC(r-23));
 
+    m->unsorted = m->firstMove; m->drops = moveSP;
     return 0;
 }