From 7755561ae133f1313b1f1e61a0baf77f51c31bd9 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Wed, 28 Dec 2016 02:09:33 +0100 Subject: fplot: fix zoom egetrect check (thanks qu7uux) --- sys/src/cmd/fplot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/src/cmd/fplot.c') diff --git a/sys/src/cmd/fplot.c b/sys/src/cmd/fplot.c index b8f80a498..c51dc8642 100644 --- a/sys/src/cmd/fplot.c +++ b/sys/src/cmd/fplot.c @@ -432,7 +432,7 @@ zoom(void) 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); -- cgit v1.2.3