aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-06-03 23:55:00 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-06-03 23:55:00 -0400
commit3ba723d79ad10420666cc7e9e1fc1537c59f6be5 (patch)
tree29a5ad575d413185be4bcb727c01b9546324f211 /IkiWiki
parent6b7d90d88a723296817de735905965c1a41184bc (diff)
downloadikiwiki-3ba723d79ad10420666cc7e9e1fc1537c59f6be5.tar
ikiwiki-3ba723d79ad10420666cc7e9e1fc1537c59f6be5.tar.gz
don't loop forever
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/search.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm
index 0d4a8f552..dd44855bd 100644
--- a/IkiWiki/Plugin/search.pm
+++ b/IkiWiki/Plugin/search.pm
@@ -93,7 +93,7 @@ sub filter (@) { #{{{
my $size=512;
my ($sample)=substr($toindex, 0, $size);
my $next=substr($toindex, $size++, 1);
- while ($next !~ /\s/) {
+ while (defined $next && $next !~ /\s/) {
$sample.=$next;
$next=substr($toindex, $size++, 1);
}