degesch: fix nick cycling

This commit is contained in:
Přemysl Eric Janouch 2015-07-11 18:04:07 +02:00
parent b3876260b9
commit 0ce4872254

View File

@ -4121,7 +4121,7 @@ irc_fetch_next_nickname (struct server *s)
char *result = NULL; char *result = NULL;
if (s->nick_counter >= 0 && (size_t) s->nick_counter < v.len) if (s->nick_counter >= 0 && (size_t) s->nick_counter < v.len)
result = str_vector_steal (&v, s->nick_counter++); result = xstrdup (v.vector[s->nick_counter++]);
if ((size_t) s->nick_counter >= v.len) if ((size_t) s->nick_counter >= v.len)
// Exhausted all nicknames // Exhausted all nicknames
s->nick_counter = -1; s->nick_counter = -1;