diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2014-08-08 02:26:23 +0200 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2014-08-08 02:34:46 +0200 |
commit | 38887df2021f4ae8a0912ad363e947aaad56aaab (patch) | |
tree | dac38f6115b10b4c10db435216a613bd1a0bf782 /src/kike.c | |
parent | 34967973aa1d6f6d4d69335a519966c2436bcd98 (diff) | |
download | xK-38887df2021f4ae8a0912ad363e947aaad56aaab.tar.gz xK-38887df2021f4ae8a0912ad363e947aaad56aaab.tar.xz xK-38887df2021f4ae8a0912ad363e947aaad56aaab.zip |
kike: fix client unregistration
Diffstat (limited to 'src/kike.c')
-rw-r--r-- | src/kike.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -681,9 +681,10 @@ client_unregister (struct client *c, const char *reason) struct str_map_iter iter; str_map_iter_init (&iter, &c->ctx->channels); - struct channel *chan; - while ((chan = str_map_iter_next (&iter))) + struct channel *chan, *next = str_map_iter_next (&iter); + for (chan = next; chan; chan = next) { + next = str_map_iter_next (&iter); struct channel_user *user; if (!(user = channel_get_user (chan, c))) continue; |