summaryrefslogtreecommitdiff
path: root/regen/regcharclass.pl
diff options
context:
space:
mode:
Diffstat (limited to 'regen/regcharclass.pl')
-rwxr-xr-xregen/regcharclass.pl9
1 files changed, 7 insertions, 2 deletions
diff --git a/regen/regcharclass.pl b/regen/regcharclass.pl
index b7dddd2efc..944f61b976 100755
--- a/regen/regcharclass.pl
+++ b/regen/regcharclass.pl
@@ -1076,8 +1076,13 @@ sub _combine {
$gtv= sprintf "$self->{val_fmt}", $item;
}
if ( @cond ) {
- return "( $cstr || ( $gtv < $test &&\n"
- . $self->_combine( $test, @cond ) . " ) )";
+ my $combine= $self->_combine( $test, @cond );
+ if (@cond >1) {
+ return "( $cstr || ( $gtv < $test &&\n"
+ . $combine . " ) )";
+ } else {
+ return "( $cstr || $combine )";
+ }
} else {
return $cstr;
}