diff options
author | Eric Wong <e@80x24.org> | 2019-06-04 02:04:33 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-06-04 10:06:18 +0000 |
commit | 7c29cce3cb92aeadc1ec589c96b36936e38fe8c1 (patch) | |
tree | 5e281adfe2fd55aebac08c701ac00cf5da3d21bf | |
parent | 3abd653020d6b4072759c83fb69c68b6e838aa09 (diff) | |
download | public-inbox-7c29cce3cb92aeadc1ec589c96b36936e38fe8c1.tar.gz |
Non-ASCII digits would be interpreted as zero when used as integers.
-rw-r--r-- | lib/PublicInbox/SearchView.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/SearchView.pm b/lib/PublicInbox/SearchView.pm index 6592b3b2..b089de9c 100644 --- a/lib/PublicInbox/SearchView.pm +++ b/lib/PublicInbox/SearchView.pm @@ -308,12 +308,12 @@ sub new { my ($class, $qp) = @_; my $r = $qp->{r}; - my ($l) = (($qp->{l} || '') =~ /(\d+)/); + my ($l) = (($qp->{l} || '') =~ /([0-9]+)/); $l = $LIM if !$l || $l > $LIM; bless { q => $qp->{'q'}, x => $qp->{x} || '', - o => (($qp->{o} || '0') =~ /(\d+)/), + o => (($qp->{o} || '0') =~ /([0-9]+)/), l => $l, r => (defined $r && $r ne '0'), }, $class; |