summaryrefslogtreecommitdiff
path: root/sys/src/cmd/fplot.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2016-12-28 02:09:33 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2016-12-28 02:09:33 +0100
commit7755561ae133f1313b1f1e61a0baf77f51c31bd9 (patch)
tree3a460012e8c7dcdc9cc0820402a37d9463328319 /sys/src/cmd/fplot.c
parent74f62ca21b03551824842bdd318f46940a78766d (diff)
fplot: fix zoom egetrect check (thanks qu7uux)
Diffstat (limited to 'sys/src/cmd/fplot.c')
-rw-r--r--sys/src/cmd/fplot.c2
1 files changed, 1 insertions, 1 deletions
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);