mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
client and server related crash fixes
This commit is contained in:
parent
a2b30dc86f
commit
33546c6b74
8 changed files with 26 additions and 18 deletions
|
|
@ -35,12 +35,15 @@ ServerGame::~ServerGame()
|
|||
|
||||
QString ServerGame::getGameListLine() const
|
||||
{
|
||||
return QString("list_games|%1|%2|%3|%4|%5|%6").arg(gameId)
|
||||
.arg(description)
|
||||
.arg(password.isEmpty() ? 0 : 1)
|
||||
.arg(players.size())
|
||||
.arg(maxPlayers)
|
||||
.arg(creator->getPlayerName());
|
||||
if (players.isEmpty())
|
||||
return QString("list_games|%1|||0|%2|").arg(gameId).arg(maxPlayers);
|
||||
else
|
||||
return QString("list_games|%1|%2|%3|%4|%5|%6").arg(gameId)
|
||||
.arg(description)
|
||||
.arg(password.isEmpty() ? 0 : 1)
|
||||
.arg(players.size())
|
||||
.arg(maxPlayers)
|
||||
.arg(creator->getPlayerName());
|
||||
}
|
||||
|
||||
QStringList ServerGame::getPlayerNames() const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue