git: 9front

Download patch

ref: 876506083fe1bbfa983ec4e274b2c94de7783fd5
parent: 223b49e60e7aa97dded85bc3bd808e2bfcbd8122
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);
--