summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-04-26 21:57:37 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-04-26 21:57:37 +0000
commit2facaf7c4dbd4158cb2080211e446e7fc84d66d8 (patch)
tree63895cbdc65e655a30b13f762f9261c4cebf162d /utils
parent996f7592d488162d2e8cb2517f76ab7df1418376 (diff)
downloadperl-2facaf7c4dbd4158cb2080211e446e7fc84d66d8.tar.gz
If some of the constants are prefixes of others,
the prefixes may never get recognized. (See 20010426.006.) p4raw-id: //depot/perl@9870
Diffstat (limited to 'utils')
-rw-r--r--utils/h2xs.PL17
1 files changed, 15 insertions, 2 deletions
diff --git a/utils/h2xs.PL b/utils/h2xs.PL
index 1b4f387d70..48cfe5337b 100644
--- a/utils/h2xs.PL
+++ b/utils/h2xs.PL
@@ -1242,12 +1242,25 @@ END
errno = 0;
END
- print $fh <<"END" if $off;
- if ($offarg + $off >= len ) {
+ if ($off) {
+ my $null = 0;
+
+ foreach my $letter (keys %leading) {
+ if ($letter eq '') {
+ $null = 1;
+ break;
+ }
+ }
+
+ my $cmp = $null ? '>' : '>=';
+
+ print $fh <<"END"
+ if ($offarg + $off $cmp len ) {
errno = EINVAL;
return 0;
}
END
+ }
print $fh <<"END";
switch (name[$offarg + $off]) {