]> git.lizzy.rs Git - plan9front.git/commitdiff
page: 12 zoom levels should be enougth
authorcinap_lenrek <cinap_lenrek@gmx.de>
Sat, 15 Jun 2013 19:09:27 +0000 (21:09 +0200)
committercinap_lenrek <cinap_lenrek@gmx.de>
Sat, 15 Jun 2013 19:09:27 +0000 (21:09 +0200)
making zoom too big just causes pagesize() multiplication to overflow
passing bogus rectangles to allocimage().

sys/src/cmd/page.c

index a44f74d4b30973e1d75cb0438228a9601e39f042..70c1bf9d79a555fe824f76ef2ddccdd424739c6b 100644 (file)
@@ -1360,7 +1360,7 @@ docmd(int i, Mouse *m)
                        break;
                o = subpt(m->xy, screen->r.min);
                if(i == Czoomin){
-                       if(zoom < 0x40000000){
+                       if(zoom < 0x1000){
                                zoom *= 2;
                                pos =  addpt(mulpt(subpt(pos, o), 2), o);
                        }