summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2010-02-19 21:12:10 +0100
committerYorhel <git@yorhel.nl>2010-02-19 21:13:19 +0100
commite5edd9736f065067172d56f394703f1062f5d743 (patch)
treead86ad78a8c2b65043d0edcd0e458ac8963886ce /lib
parent9c6f96c07b9d46fdd36269a90312972cf17bfb78 (diff)
VNDB::Func::gtintype: Another silly bug fix
You can't quite check the length of the GTIN code if you strip away zeros in the beginning, right?
Diffstat (limited to 'lib')
-rw-r--r--lib/VNDB/Func.pm1
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/VNDB/Func.pm b/lib/VNDB/Func.pm
index 3a132758..d223d9f9 100644
--- a/lib/VNDB/Func.pm
+++ b/lib/VNDB/Func.pm
@@ -134,7 +134,6 @@ sub bb2html {
# Also 'normalizes' the first argument in place
sub gtintype {
$_[0] =~ s/[^\d]+//g;
- $_[0] =~ s/^0+//;
my $c = shift;
return undef if $c !~ /^[0-9]{12,13}$/; # only gtin-12 and 13
$c = ('0'x(13-length $c)) . $c; # pad with zeros