Fix bug in move sorting
[hachu.git] / hachu.c
diff --git a/hachu.c b/hachu.c
index ac3ed99..ca7f32d 100644 (file)
--- a/hachu.c
+++ b/hachu.c
@@ -1612,7 +1612,7 @@ if(PATH) printf("%d:%2d:%2d msp=%d\n",level,depth,iterDep,msp);
       // MOVE EXTRACTION\r
     extractMove:\r
 if(flag & depth >= 0) printf("%2d:%d extract %d/%d\n", depth, iterDep, curMove, msp);\r
-      if(curMove < sorted) {\r
+      if(curMove > sorted) {\r
        move = moveStack[sorted=j=curMove];\r
        for(i=curMove+1; i<msp; i++)\r
          if(moveStack[i] > move) move = moveStack[j=i]; // search move with highest priority\r