summaryrefslogtreecommitdiff
path: root/scripts/Dpkg/Control/HashCore.pm
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Dpkg/Control/HashCore.pm')
-rw-r--r--scripts/Dpkg/Control/HashCore.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/Dpkg/Control/HashCore.pm b/scripts/Dpkg/Control/HashCore.pm
index a138698a4..e83522729 100644
--- a/scripts/Dpkg/Control/HashCore.pm
+++ b/scripts/Dpkg/Control/HashCore.pm
@@ -211,9 +211,10 @@ sub parse {
my $lead = substr $_, 0, 1;
next if $lead eq '#';
$paraborder = 0;
- if (m/^(\S+?)\s*:\s*(.*)$/) {
+
+ my ($name, $value) = split /\s*:\s*/, $_, 2;
+ if (defined $name and $name =~ m/^\S+?$/) {
$parabody = 1;
- my ($name, $value) = ($1, $2);
if ($lead eq '-') {
$self->parse_error($desc, g_('field cannot start with a hyphen'));
}