mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 13:17:44 +00:00
Validate input UCI moves
Running following command: position startpos moves e1e8 Makes SF to assert in debug mode in do_move() but to accept bad input and continue in release mode where probably it is going to crash little later. So validate input before to feed do_move(). Suggestion by Yakovlev Vadim. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -777,6 +777,8 @@ bool Position::move_gives_check(Move m, const CheckInfo& ci) const {
|
||||
|
||||
void Position::do_setup_move(Move m) {
|
||||
|
||||
assert(move_is_ok(m));
|
||||
|
||||
StateInfo newSt;
|
||||
|
||||
// Update the number of full moves after black's move
|
||||
|
||||
Reference in New Issue
Block a user