fplot: fix zoom egetrect check (thanks qu7uux)

This commit is contained in:
cinap_lenrek 2016-12-28 02:09:33 +01:00
parent 74f62ca21b
commit 7755561ae1

View file

@ -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);