From 31723d41d7ce23d2938536603a240ce0d451bde0 Mon Sep 17 00:00:00 2001 From: Graham Percival Date: Mon, 8 Feb 2010 00:34:46 +0000 Subject: [PATCH] Doc build: fix lc_last. I have NO CLUE how I managed to ignore the fact that I was checking a non-existant variable.. nor how I managed to "check" that my "fix" "worked" with completely broken code. I also have NO CLUE why perl didn't barf when I started checking the state of a non-existant variable, but I'm sadly not surprised about it's permissiveness. --- Documentation/lilypond-texi2html.init | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/lilypond-texi2html.init b/Documentation/lilypond-texi2html.init index 376e201a8c..92c48b970c 100644 --- a/Documentation/lilypond-texi2html.init +++ b/Documentation/lilypond-texi2html.init @@ -636,8 +636,8 @@ sub lc_last($) my $href = shift; my @hrefsplit = split('/', $href); # change the last portion (the filename), if it exists - if ($#array > 0) { - @hrefsplit[$#array] = lc( @hrefsplit[$#array] ); + if ($#hrefsplit > 0) { + @hrefsplit[$#hrefsplit] = lc( @hrefsplit[$#hrefsplit] ); $href = join("/", @hrefsplit); } return $href; -- 2.39.5