libconfig-simple-perl (4.59-5) empty_string.patch

Summary

 Simple.pm |    1 +
 1 file changed, 1 insertion(+)

    
download this patch

Patch contents

Description: If the array is empty, we return an empty string.
Origin: vendor
Bug: http://bugs.debian.org/593043
Forwarded: no
Author: Raphaƫl Hertzog <hertzog@debian.org>
Reviewed-by: gregor herrmann <gregoa@debian.org>
Last-Update: 2010-08-16

--- a/Simple.pm
+++ b/Simple.pm
@@ -471,6 +471,7 @@
   }
 
   defined($rv) or return;
+  return "" if scalar(@$rv) == 0;
 
   for ( my $i=0; $i < @$rv; $i++ ) {
     $rv->[$i] =~ s/\\n/\n/g;