Make sure $img_num always starts a reasonable place, even if returning from
authorSteinar H. Gunderson <sesse@debian.org>
Thu, 12 Apr 2007 00:13:12 +0000 (02:13 +0200)
committerSteinar H. Gunderson <sesse@debian.org>
Thu, 12 Apr 2007 00:13:12 +0000 (02:13 +0200)
fullscreen.

perl/Sesse/pr0n/Index.pm

index 849870f4ec8e8add783689ce96967823eb0d0804..754c98804ace0d5df8f364a31e4885e772455933 100644 (file)
@@ -201,7 +201,7 @@ sub handler {
 
                my $toclose = 0;
                my $lastupl = "";
-               my $img_num = $start;
+               my $img_num = (defined($start) && defined($num)) ? $start : 0;
                
                # Print out all thumbnails
                if ($rot == 1) {