Selaa lähdekoodia

doing it in a shorter way

Anselm R. Garbe 18 vuotta sitten
vanhempi
commit
260a55ef62
1 muutettua tiedostoa jossa 1 lisäystä ja 3 poistoa
  1. 1 3
      dwm.c

+ 1 - 3
dwm.c

@@ -1321,10 +1321,8 @@ run(void) {
 					*p = '\0';
 					offset = 0;
 				}
-				else if(offset + r < len - 1)
-					offset += r;
 				else
-					offset = 0;
+					offset = (offset + r < len - 1) ? offset + r : 0;
 			}
 			drawbar();
 		}