]> git.lizzy.rs Git - plan9front.git/commitdiff
rio: use libdraw's badrect() to exclude some extreme cases in goodrect()
authorcinap_lenrek <cinap_lenrek@felloff.net>
Sun, 6 Dec 2020 13:44:23 +0000 (14:44 +0100)
committercinap_lenrek <cinap_lenrek@felloff.net>
Sun, 6 Dec 2020 13:44:23 +0000 (14:44 +0100)
sys/src/cmd/rio/wctl.c

index 22f7b501cb68b6853679db138a899b7e9f9ef012..bef98fda95e7e03071d70bd450e6afd4ba22f8aa 100644 (file)
@@ -88,7 +88,7 @@ static char *params[] = {
 int
 goodrect(Rectangle r)
 {
-       if(!eqrect(canonrect(r), r))
+       if(badrect(r) || !eqrect(canonrect(r), r))
                return 0;
        /* reasonable sizes only please */
        if(Dx(r) > BIG*Dx(screen->r))