Explorar o código

applied endless loop prevention on zoom()

arg@10ksloc.org %!s(int64=19) %!d(string=hai) anos
pai
achega
525ef3c178
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      client.c

+ 3 - 1
client.c

@@ -469,9 +469,11 @@ zoom(Arg *arg)
 	if(!sel || (arrange != dotile) || sel->isfloat)
 		return;
 
-	if(sel == getnext(clients) && sel->next)  {
+	if(sel == getnext(clients))  {
 		if((c = getnext(sel->next)))
 			sel = c;
+		else
+			return;
 	}
 
 	/* pop */