Skip to content
Permalink
Browse files

Escape nulls in strings? Otherwise, we can't tell the difference betw…

…een a blank string and a string with nulls in it.
  • Loading branch information...
oylenshpeegul committed Jan 15, 2012
1 parent 37966d0 commit 52171afc1023692eee36d2961447d046142a35c2
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/Data/Printer.pm
@@ -303,6 +303,7 @@ sub SCALAR {
$string .= colored($$item, $p->{color}->{'number'});
}
else {
$$item =~ s/\0/\\0/g;
$string .= colored(qq["$$item"], $p->{color}->{'string'});
}

0 comments on commit 52171af

Please sign in to comment.
You can’t perform that action at this time.