unicode: silence perl warning about empty query range offsets
authorMischa POSLAWSKY <perl@shiar.org>
Thu, 5 Sep 2024 12:09:12 +0000 (14:09 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Sat, 7 Sep 2024 23:50:14 +0000 (01:50 +0200)
Stop complaining [Argument "" isn't numeric] about implicit 0- in presets
like 'latin/sample=-1'.

unicode.plp

index ffee44f386fbb0c6a5d154458fa678aff8dd3191..1f7414446c1d44a14f49048b1aa07c3d67491002 100644 (file)
@@ -152,6 +152,7 @@ $glyphs->print(map {
                                last if $table->[$rowlen] =~ /\./;
                        }
                        my @cells = map {
                                last if $table->[$rowlen] =~ /\./;
                        }
                        my @cells = map {
+                               s/^(?=-)/0/;
                                my $end = (s/-(.+)?// ? ($1 // @$table / $rowlen - 1) : $_) + 1;
                                $_ * $rowlen .. $end * $rowlen - 1;
                        } @select;
                                my $end = (s/-(.+)?// ? ($1 // @$table / $rowlen - 1) : $_) + 1;
                                $_ * $rowlen .. $end * $rowlen - 1;
                        } @select;