Skip to content

Commit

Permalink
Fix: use numeric sort
Browse files Browse the repository at this point in the history
  • Loading branch information
zmughal committed Sep 27, 2020
1 parent e0e3033 commit ae442eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Renard/Curie/Component/JacquardCanvas.pm
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ sub cb_on_draw {
my $start_pages = $self->{selection}{start}{pointer}{pages};
my $end_pages = $self->{selection}{end}{pointer}{pages};
if( @$start_pages && @$end_pages ) {
my @sorted = sort ( $start_pages->[0] , $end_pages->[0] );
my @sorted = sort {$a <=> $b} ( $start_pages->[0] , $end_pages->[0] );
my @pgs = ( $sorted[0] .. $sorted[1] );
my @bboxes;
for my $page_number (@pgs) {
Expand Down

0 comments on commit ae442eb

Please sign in to comment.