Skip to content

Commit 170946d

Browse files
committed
mktables: Fix #23520
The code was attempting to get a slice of an entire array excluding the 0th element. But it was using the wrong incantation. The array is the path to a file with each element being one directory. And it just happened to work because of the current layout of the directories. This commit changes so it would continue to work if the directory structure were to be altered.
1 parent 9df4510 commit 170946d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/unicore/mktables

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16087,7 +16087,10 @@ sub register_file_for_name($table, $directory_ref, $file) {
1608716087
# No swash means don't do the rest of this.
1608816088
next if $table->isa('Map_Table') && $table->fate != $ORDINARY;
1608916089

16090-
my $sub_filename = join('/', $directory_ref->[1, -1], $file);
16090+
# Get the path to $file stripping off any top level directory
16091+
my $sub_filename = join('/',
16092+
($directory_ref->@[1, $#$directory_ref] // ""),
16093+
$file);
1609116094

1609216095
my $property = $table->property;
1609316096
my $property_name = ($property == $perl)

0 commit comments

Comments
 (0)