summaryrefslogtreecommitdiff
path: root/ext/re
diff options
context:
space:
mode:
authorHans Mulder <hansmu@xs4all.nl>1999-01-12 00:22:45 +0200
committerJarkko Hietaniemi <jhi@iki.fi>1999-01-13 18:06:56 +0000
commitc712d3769459fa50fd65778c268dc26d41922ffc (patch)
tree745a835db0c8b9dfa2fd4cf98f4801bbb046dae6 /ext/re
parent88b39979ed4ec47a51ecb175fcf086fb7df0ebdb (diff)
downloadperl-c712d3769459fa50fd65778c268dc26d41922ffc.tar.gz
[Patch for 5.005_54] re::debugcolors dumps core
To: perlbug@perl.com Cc: hansmu@xs4all.nl Message-ID: <MLIST_9901111947.AA22109@icgned.icgroup.nl> p4raw-id: //depot/cfgperl@2603
Diffstat (limited to 'ext/re')
-rw-r--r--ext/re/re.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/re/re.pm b/ext/re/re.pm
index 1c225e3a7c..09f52d6086 100644
--- a/ext/re/re.pm
+++ b/ext/re/re.pm
@@ -86,9 +86,10 @@ sub setcolor {
my $terminal = Tgetent Term::Cap ({OSPEED => 9600}); # Avoid warning.
my $props = $ENV{PERL_RE_TC} || 'md,me,so,se,us,ue';
my @props = split /,/, $props;
+ my $colors = join "\t", map {$terminal->Tputs($_,1)} @props;
-
- $ENV{PERL_RE_COLORS} = join "\t", map {$terminal->Tputs($_,1)} @props;
+ $colors =~ s/\0//g;
+ $ENV{PERL_RE_COLORS} = $colors;
};
}