fixup
authorJoost VandeVondele <Joost.VandeVondele@gmail.com>
Wed, 7 Nov 2018 15:55:25 +0000 (16:55 +0100)
committerSt├ęphane Nicolet <cassio@free.fr>
Thu, 8 Nov 2018 15:20:23 +0000 (16:20 +0100)
src/search.cpp

index 8a32e827488739ea351a4ee77d0532138b578ffa..d0bbc9675c9618ff780cb51b3f89a8eb8abf31f6 100644 (file)
@@ -944,8 +944,8 @@ moves_loop: // When in check, search starts from here
           extension = ONE_PLY;
 
       // Extension for king moves that change castling rights
-      if (   type_of(movedPiece) == KING
-          && pos.can_castle(us)
+      if (   pos.can_castle(us)
+          && type_of(movedPiece) == KING
           && depth < 12 * ONE_PLY)
           extension = ONE_PLY;