shithub: riscv

Download patch

ref: bf2a6f786502026ce4229bc84a6a22e5e55a7c13
parent: 082560fd5b48ff4b8c0f6c9b093c86ddf75052f6
author: cinap_lenrek <[email protected]>
date: Sun Dec 6 09:44:23 EST 2020

rio: use libdraw's badrect() to exclude some extreme cases in goodrect()

--- a/sys/src/cmd/rio/wctl.c
+++ b/sys/src/cmd/rio/wctl.c
@@ -88,7 +88,7 @@
 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))