diff options
author | Karl Williamson <khw@cpan.org> | 2021-06-30 11:15:56 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2021-08-07 04:46:45 -0600 |
commit | 1dff551d79b00d841b88282abc2e1fa43adaff5b (patch) | |
tree | 0bcc358125a1f2088efbe8da9614d4525f07856c | |
parent | bc5a92d8a7e80ce9c119eea0195a6626c5138615 (diff) | |
download | perl-1dff551d79b00d841b88282abc2e1fa43adaff5b.tar.gz |
regcharclass.pl: Add an error check
-rw-r--r-- | regcharclass.h | 2 | ||||
-rwxr-xr-x | regen/regcharclass.pl | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/regcharclass.h b/regcharclass.h index 245e13255a..4643440d39 100644 --- a/regcharclass.h +++ b/regcharclass.h @@ -3765,6 +3765,6 @@ * 696e706fddd3ce8cd48c7ea91caf4c9edf5c296432d320aa7b78631f69aa9eac lib/unicore/mktables * 50b85a67451145545a65cea370dab8d3444fbfe07e9c34cef560c5b7da9d3eef lib/unicore/version * 0a6b5ab33bb1026531f816efe81aea1a8ffcd34a27cbea37dd6a70a63d73c844 regen/charset_translations.pl - * 69854621b341c8eab85aad890763e28eaa6d4df83cecb0566e81f7f6619efff0 regen/regcharclass.pl + * 1c0276b3b54a2da17de7b32dd92f3c996ab859307e2fd504046e900d05417270 regen/regcharclass.pl * b2f896452d2b30da3e04800f478c60c1fd0b03d6b668689b020f1e3cf1f1cdd9 regen/regcharclass_multi_char_folds.pl * ex: set ro: */ diff --git a/regen/regcharclass.pl b/regen/regcharclass.pl index 39de579127..9fc939fdef 100755 --- a/regen/regcharclass.pl +++ b/regen/regcharclass.pl @@ -1114,7 +1114,11 @@ sub _cond_as_str { # If the first range matches all 256 possible bytes, it is # trivially true. - return 1 if $ranges[0]->[1] == 0xFF; + if ($ranges[0]->[1] == 0xFF) { + die "Range spanning all bytes must be the only one" + if @ranges > 1; + return 1; + } # this case # Here, the first range starts at 0, but doesn't match everything. # But the condition doesn't have to worry about being < 0 |