diff --git a/src/game.c b/src/game.c index 37a1640..c0b7627 100644 --- a/src/game.c +++ b/src/game.c @@ -28,8 +28,8 @@ void flush_outgoing(struct player* player) { if (player->conn == NULL) return; struct packet* packet; - while (packet = queue_maybepop(player->outgoing_packets) != NULL) { - packet_write(player->conn, player); + while ((packet = queue_maybepop(player->outgoing_packets)) != NULL) { + packet_write(player->conn, packet); } netmgr_trigger_write(player->conn->managed_conn); }