Fix loop comparison broken in last commit, from Thomas Adam.

This commit is contained in:
nicm 2015-06-09 07:07:06 +00:00
parent c4e811e519
commit a412dd616f

View File

@ -100,7 +100,7 @@ cmd_attach_session(struct cmd_q *cmdq, const char *tflag, int dflag, int rflag,
* the same session as currently attached to.
*/
TAILQ_FOREACH(c_loop, &clients, entry) {
if (c_loop->session != s || c == c)
if (c_loop->session != s || c == c_loop)
continue;
server_write_client(c, MSG_DETACH,
c_loop->session->name,