summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2017-07-31 23:43:17 -0400
committerJune McEnroe <june@causal.agency>2017-07-31 23:43:17 -0400
commit7e978b57cc75e9802242937253df8b27babb4c6f (patch)
tree65dbb2964726ce3b6950818844fc0ec7ef43542d
parentBuild with debug info (diff)
downloadtorus-7e978b57cc75e9802242937253df8b27babb4c6f.tar.gz
torus-7e978b57cc75e9802242937253df8b27babb4c6f.zip
Fix removing clients from clientCast
Diffstat (limited to '')
-rwxr-xr-xserver.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/server.c b/server.c
index 9724359..5aaf855 100755
--- a/server.c
+++ b/server.c
@@ -109,8 +109,9 @@ static void clientCast(const struct Client *origin, const struct ServerMessage *
         if (client->tileY != origin->tileY) continue;
 
         if (!clientSend(client, msg)) {
+            struct Client *dead = client;
             client = client->next;
-            clientRemove(client);
+            clientRemove(dead);
             if (!client) break;
         }
     }