groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 29/35: [build]: Resolve Perl warning when no URW fonts.


From: G. Branden Robinson
Subject: [groff] 29/35: [build]: Resolve Perl warning when no URW fonts.
Date: Fri, 15 Jul 2022 23:12:00 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit bbdc314682a74c11b9dd90b8ff54ec160b7e59d9
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Jul 13 01:53:30 2022 -0500

    [build]: Resolve Perl warning when no URW fonts.
    
    * font/devpdf/util/BuildFoundries.pl (LoadFoundry): Verify that
      `$foundrypath->[$j]` is defined before operating on it.
    
    Use of uninitialized value in pattern match (m//) at
    .../font/devpdf/util/BuildFoundries line 99, <F> line 23.
---
 ChangeLog                          | 5 +++++
 font/devpdf/util/BuildFoundries.pl | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index c49cb05c..4c32763b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-07-13  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * font/devpdf/util/BuildFoundries.pl (LoadFoundry): Verify that
+       `$foundrypath->[$j]` is defined before operating on it.
+
 2022-07-10  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        [afmtodit]: Clarify diagnostic message.
diff --git a/font/devpdf/util/BuildFoundries.pl 
b/font/devpdf/util/BuildFoundries.pl
index 2ba5a7de..195ed167 100644
--- a/font/devpdf/util/BuildFoundries.pl
+++ b/font/devpdf/util/BuildFoundries.pl
@@ -95,7 +95,8 @@ sub LoadFoundry
            push(@{$foundrypath},(split(':',$r[2])),@{$devps});
            foreach my $j (0..$#{$foundrypath})
            {
-               if ($foundrypath->[$j]=~m'\s*\(gs\)')
+               if (defined($foundrypath->[$j])
+                   && $foundrypath->[$j]=~m'\s*\(gs\)')
                {
                    splice(@{$foundrypath},$j,1,@{$GSpath});
                }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]