From 135aa88b55723e80b8f748640cf1ff4c5aef42cb Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 9 Jun 2015 07:07:06 +0000 Subject: [PATCH] Fix loop comparison broken in last commit, from Thomas Adam. --- usr.bin/tmux/cmd-attach-session.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/tmux/cmd-attach-session.c b/usr.bin/tmux/cmd-attach-session.c index b53bb98827e..968cf6ac0b5 100644 --- a/usr.bin/tmux/cmd-attach-session.c +++ b/usr.bin/tmux/cmd-attach-session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-attach-session.c,v 1.36 2015/06/07 21:39:39 nicm Exp $ */ +/* $OpenBSD: cmd-attach-session.c,v 1.37 2015/06/09 07:07:06 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -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, -- 2.20.1