sbotools2

Maintenance fork of the original sbotools version 2
Log | Files | Refs | README

commit 699f7f841418f10aea9ee35d89951e8048fbeafd
parent fbed2700af82c3e01838dc512642b0c4ab18a7ac
Author: Andreas Guldstrand <andreas.guldstrand@gmail.com>
Date:   Tue, 13 Dec 2016 12:00:27 +0200

SBO::Lib::Info: fix bug in parse_info with wrong handling of empty values

Diffstat:
MSBO-Lib/lib/SBO/Lib/Info.pm | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 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); }