From: Steinar H. Gunderson Date: Thu, 12 Apr 2007 00:13:12 +0000 (+0200) Subject: Make sure $img_num always starts a reasonable place, even if returning from X-Git-Url: https://git.sesse.net/?p=pr0n;a=commitdiff_plain;h=62fc186e8f1f3377061e5083d495df944d78010d Make sure $img_num always starts a reasonable place, even if returning from fullscreen. --- diff --git a/perl/Sesse/pr0n/Index.pm b/perl/Sesse/pr0n/Index.pm index 849870f..754c988 100644 --- a/perl/Sesse/pr0n/Index.pm +++ b/perl/Sesse/pr0n/Index.pm @@ -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) {