From bbbf3e2a6503540a797bd03da64d99e0dc3252f4 Mon Sep 17 00:00:00 2001 From: ebbit1q Date: Sun, 24 Oct 2021 02:04:52 +0200 Subject: [PATCH] don't reset pt if there is nothing to reset (#4438) * don't reset pt if there is nothing to reset when the client resets the pt of a card it intentionally does not include cards that already have the correct pt, this can lead to the client sending an empty command to the server, which will be rejected * clangify --- cockatrice/src/player.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cockatrice/src/player.cpp b/cockatrice/src/player.cpp index e50a48e5..7a353a05 100644 --- a/cockatrice/src/player.cpp +++ b/cockatrice/src/player.cpp @@ -2984,7 +2984,9 @@ void Player::actResetPT() } } - game->sendGameCommand(prepareGameCommand(commandList), playerid); + if (!commandList.empty()) { + game->sendGameCommand(prepareGameCommand(commandList), playerid); + } } QVariantList Player::parsePT(const QString &pt)