Fix move bug for oce and for all
[hachu.git] / hachu.c
diff --git a/hachu.c b/hachu.c
index 59fbacf..2af2697 100644 (file)
--- a/hachu.c
+++ b/hachu.c
@@ -1460,7 +1460,7 @@ GenCapts(int sqr, int victimValue)
     for(i=0; i<8; i++) {    // scan all knight jumps to locate source\r
       int x = sqr - nStep[i], attacker = board[x];\r
       if(attacker == EMPTY || (attacker & TYPE) != stm) continue;\r
-      if(p[attacker].range[i] <= N && p[attacker].range[i] >= S && p[attacker].range[i] != J) { // has Knight jump in our direction\r
+      if(p[attacker].range[i] <= L && p[attacker].range[i] >= S || p[attacker].range[i] == N) { // has Knight jump in our direction\r
        NewCapture(x, sqr + victimValue, p[attacker].promoFlag);   // plain jump (as in N)\r
        if(p[attacker].range[i] < N) { // Lion power; generate double captures over two possible intermediates\r
          int v = kStep[i]; // leftish path\r