summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorJune McEnroe <programble@gmail.com>2017-07-31 23:43:17 -0400
committerJune McEnroe <programble@gmail.com>2017-07-31 23:43:17 -0400
commit00027eb1f90db246a27cf422e124ea7650460dab (patch)
tree37eafe009ff27f7029972f251f5a630e46b7ccfc
parentBuild with debug info (diff)
downloadtorus-00027eb1f90db246a27cf422e124ea7650460dab.tar.gz
torus-00027eb1f90db246a27cf422e124ea7650460dab.zip
Fix removing clients from clientCast
-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;
         }
     }