about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xserver.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/server.c b/server.c
index 64e4e18..2fcdff7 100755
--- a/server.c
+++ b/server.c
@@ -123,16 +123,15 @@ static bool clientSend(const struct Client *client, const struct ServerMessage *
 }
 
 static void clientCast(const struct Client *origin, const struct ServerMessage *msg) {
+retry:
     for (struct Client *client = clientHead; client; client = client->next) {
         if (client == origin) continue;
         if (client->tileX != origin->tileX) continue;
         if (client->tileY != origin->tileY) continue;
 
         if (!clientSend(client, msg)) {
-            struct Client *dead = client;
-            client = client->next;
-            clientRemove(dead);
-            if (!client) break;
+            clientRemove(client);
+            goto retry;
         }
     }
 }
-0400'>2014-06-28Add indent guidesJune McEnroe 2014-06-10Add delimitMateJune McEnroe 2014-05-28Use ~ for home directory in gitconfigJune McEnroe 2014-05-28Add .DS_store to global gitignoreJune McEnroe 2014-05-15Add OS X specific shell configurationsJune McEnroe 2014-04-19Heavily comment .vimrcJune McEnroe 2014-04-19Autocorrect git commandsJune McEnroe 2014-04-19Fix gitprompt for git 1.9.1June McEnroe