fbpdf: bound vertical position to FBCOLS in zoom
authorAli Gholami Rudi <ali@rudi.ir>
Mon, 7 May 2012 01:52:23 +0000 (7 06:22 +0430)
committerAli Gholami Rudi <ali@rudi.ir>
Mon, 7 May 2012 01:52:23 +0000 (7 06:22 +0430)
fbpdf.c

diff --git a/fbpdf.c b/fbpdf.c
index 9da3f8b..f890fb5 100644 (file)
--- a/fbpdf.c
+++ b/fbpdf.c
@@ -135,7 +135,7 @@ static void mainloop(void)
                case 'z':
                        _zoom = zoom;
                        zoom = getcount(15);
-                       showpage(num, head * zoom / _zoom);
+                       showpage(num, MIN(maxhead, head * zoom / _zoom));
                        break;
                case 'r':
                        rotate = getcount(0);