Assign to the right variable when comparing clients.
authornicm <nicm@openbsd.org>
Mon, 27 Apr 2015 22:42:10 +0000 (22:42 +0000)
committernicm <nicm@openbsd.org>
Mon, 27 Apr 2015 22:42:10 +0000 (22:42 +0000)
usr.bin/tmux/cmd-find.c

index 5caa57d..2f83948 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-find.c,v 1.1 2015/04/27 16:25:57 nicm Exp $ */
+/* $OpenBSD: cmd-find.c,v 1.2 2015/04/27 22:42:10 nicm Exp $ */
 
 /*
  * Copyright (c) 2015 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -131,7 +131,7 @@ cmd_find_best_client(struct client **clist, u_int csize)
        } else {
                TAILQ_FOREACH(c_loop, &clients, entry) {
                        if (cmd_find_client_better(c_loop, c))
-                               c_loop = c;
+                               c = c_loop;
                }
        }
        return (c);