History

fplot: fix zoom egetrect check (thanks qu7uux)

cinap_lenrek committed 9 years ago

Commit 87650601 parent 223b49e1 file · +1 −1Browse files

Showing the changes to sys/src/cmd/fplot.c (1 of 1 file). Show all

Unified · Split

sys/src/cmd/fplot.c+1−1
@@ -432,7 +432,7 @@ zoom(void) · 431 unmodified lines
432 432
433 m.buttons = 7;433 m.buttons = 7;
434 r = egetrect(1, &m);434 r = egetrect(1, &m);
435 if(r.min.x == 0 && r.min.y == 0 && r.max.x == 0 && r.max.y == 0)435 if(Dx(r) < 1 || Dy(r) < 1)
436 return;436 return;
437 xmin_ = convx(&screen->r, r.min.x);437 xmin_ = convx(&screen->r, r.min.x);
438 xmax_ = convx(&screen->r, r.max.x);438 xmax_ = convx(&screen->r, r.max.x);