summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2010-10-31 16:00:28 +0100
committerYorhel <git@yorhel.nl>2010-10-31 16:00:28 +0100
commit0582b57798426b8e3820a745496900c856fb6286 (patch)
tree4776ea75089142071c15baa00bda550dbf97bc71 /lib
parent25aa82f5e15115e58d91ecb09d5f0da75ccba354 (diff)
Multi::Anime: don't crash when anidb returns an invalid or empty year
Like as with Steins;Gate, where the year isn't known.
Diffstat (limited to 'lib')
-rw-r--r--lib/Multi/Anime.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Multi/Anime.pm b/lib/Multi/Anime.pm
index 05852e49..dd32782d 100644
--- a/lib/Multi/Anime.pm
+++ b/lib/Multi/Anime.pm
@@ -230,7 +230,7 @@ sub receivepacket { # input, wheelid
}
$col[1] = undef if !$col[1];
$col[2] = undef if !$col[2] || $col[2] =~ /^0,/;
- $col[3] = $1 if $col[3] =~ /^([0-9]+)/; # remove multi-year stuff
+ $col[3] = $col[3] =~ /^([0-9]+)/ ? $1 : undef;
$col[3] = undef if !$col[3];
$col[4] = $_[HEAP]{anime_types}{ lc($col[4]) };
$col[5] = undef if !$col[5];