1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:27:45 +00:00

LibChess: Move inputs when creating chess Commands

This commit is contained in:
Sam Atkins 2023-04-21 15:52:17 +01:00 committed by Andreas Kling
parent 29c41e953b
commit 8529e660ca
2 changed files with 9 additions and 9 deletions

View file

@ -126,7 +126,7 @@ ErrorOr<NonnullOwnPtr<PositionCommand>> PositionCommand::from_string(StringView
for (size_t i = 3; i < tokens.size(); ++i) {
TRY(moves.try_append(Move(tokens[i])));
}
return adopt_nonnull_own_or_enomem(new (nothrow) PositionCommand(fen, moves));
return adopt_nonnull_own_or_enomem(new (nothrow) PositionCommand(move(fen), move(moves)));
}
ErrorOr<String> PositionCommand::to_string() const