shithub: riscv

Download patch

ref: 7755561ae133f1313b1f1e61a0baf77f51c31bd9
parent: 74f62ca21b03551824842bdd318f46940a78766d
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Tue Dec 27 21:09:33 EST 2016

fplot: fix zoom egetrect check (thanks qu7uux)

--- a/sys/src/cmd/fplot.c
+++ b/sys/src/cmd/fplot.c
@@ -432,7 +432,7 @@
 	
 	m.buttons = 7;
 	r = egetrect(1, &m);
-	if(r.min.x == 0 && r.min.y == 0 && r.max.x == 0 && r.max.y == 0)
+	if(Dx(r) < 1 || Dy(r) < 1)
 		return;
 	xmin_ = convx(&screen->r, r.min.x);
 	xmax_ = convx(&screen->r, r.max.x);