summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-03-21 09:52:59 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-03-21 09:52:59 +0000
commitaf74d68c633716bdd3cc1acd16a021c3c303ca0c (patch)
tree3c9e62935622adfe8cd051d24fff1426e63b3af6 /perl-install
parente74a77699a60309ef5e45ac8138997292c43c725 (diff)
downloaddrakx-af74d68c633716bdd3cc1acd16a021c3c303ca0c.tar
drakx-af74d68c633716bdd3cc1acd16a021c3c303ca0c.tar.gz
drakx-af74d68c633716bdd3cc1acd16a021c3c303ca0c.tar.bz2
drakx-af74d68c633716bdd3cc1acd16a021c3c303ca0c.tar.xz
drakx-af74d68c633716bdd3cc1acd16a021c3c303ca0c.zip
ensure strange return value from gtf(1) doesn't cause havoc
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/Xconfig/xfree.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/perl-install/Xconfig/xfree.pm b/perl-install/Xconfig/xfree.pm
index e65948dc2..151521f70 100644
--- a/perl-install/Xconfig/xfree.pm
+++ b/perl-install/Xconfig/xfree.pm
@@ -315,10 +315,11 @@ sub add_gtf_ModeLines {
($res eq '1400x1050' || $Xconfig::xfree::resolution2ratio{$res} ne '4/3')) {
@to_add = map {
my $s = run_program::rooted_get_stdout($::prefix, 'gtf', $resolution->{X}, $resolution->{Y}, $_);
- my ($name, $val) = $s =~ /ModeLine\s*"(.*)"(.*)/i;
- chomp $val;
- $name =~ s/\.00//; #- nicer that way
- { val => qq("${name}"$val), pre_comment => "# $banner\n" };
+ if (my ($name, $val) = $s =~ /ModeLine\s*"(.*)"(.*)/i) {
+ chomp $val;
+ $name =~ s/\.00//; #- nicer that way
+ { val => qq("${name}"$val), pre_comment => "# $banner\n" };
+ } else { () }
} reverse(sort_numbers(@Xconfig::xfree::vfreqs));
}