Fix assertion for atomic
authorFabian Fichter <ianfab@users.noreply.github.com>
Sat, 27 Feb 2021 10:26:02 +0000 (11:26 +0100)
committerFabian Fichter <ianfab@users.noreply.github.com>
Sat, 27 Feb 2021 10:26:02 +0000 (11:26 +0100)
No functional change.

src/position.cpp

index 065f34e..332aadf 100644 (file)
@@ -1752,6 +1752,8 @@ void Position::undo_move(Move m) {
                                                                                : ~unpromotedBpc);
           }
       }
+      // Reset piece since it exploded itself
+      pc = piece_on(to);
   }
 
   // Remove gated piece