diff options
author | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-12-13 12:00:27 +0200 |
---|---|---|
committer | Andreas Guldstrand <andreas.guldstrand@gmail.com> | 2016-12-13 12:00:27 +0200 |
commit | 699f7f841418f10aea9ee35d89951e8048fbeafd (patch) | |
tree | 706598d57d9f4bcb60e5a9f2576b24d4f320eadd /SBO-Lib/lib/SBO | |
parent | fbed2700af82c3e01838dc512642b0c4ab18a7ac (diff) | |
download | sbotools2-699f7f841418f10aea9ee35d89951e8048fbeafd.tar.xz |
SBO::Lib::Info: fix bug in parse_info with wrong handling of empty values
Diffstat (limited to 'SBO-Lib/lib/SBO')
-rw-r--r-- | SBO-Lib/lib/SBO/Lib/Info.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/SBO-Lib/lib/SBO/Lib/Info.pm b/SBO-Lib/lib/SBO/Lib/Info.pm index 729ed14..91a96e0 100644 --- a/SBO-Lib/lib/SBO/Lib/Info.pm +++ b/SBO-Lib/lib/SBO/Lib/Info.pm @@ -216,9 +216,10 @@ sub parse_info { my $pos = 0; my %ret; - while ($info_str =~ /\G([A-Za-z0-9_]+)="([^"]+)"\n/g) { + while ($info_str =~ /\G([A-Za-z0-9_]+)="([^"]*)"\n/g) { my $key = $1; my @val = split " ", $2; + @val = '' unless @val; $ret{$key} = \@val; $pos = pos($info_str); } |