Fix a bug where the fullscreen code would ask for "1600x1087" etc. due to
authorSteinar H. Gunderson <sesse@debian.org>
Mon, 27 Aug 2007 07:46:34 +0000 (09:46 +0200)
committerSteinar H. Gunderson <sesse@debian.org>
Mon, 27 Aug 2007 07:46:34 +0000 (09:46 +0200)
the cropping code modifying fixed_sizes when it shouldn't.

files/pr0n-fullscreen.js

index db9d434cb5b222e17cbb5ae06b328ee68bc11f2a..1ec07e6f917af2dd34b4d736046a9f7c2a55390c 100644 (file)
@@ -99,7 +99,8 @@ function pick_image_size(screen_size, image_size)
                }
 
                if (screen_size[0] >= width && screen_size[1] >= height) {
-                       return fixed_sizes[i];
+                       // be sure _not_ to return a reference
+                       return [ fixed_sizes[i][0], fixed_sizes[i][1] ];
                }
        }
        return [ 80, 64 ];