From ad694a494158d44ff3dce86d20f4f2afb1dc142e Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Mon, 1 May 2017 06:53:06 +0100 Subject: [PATCH] mkfiles.pl: fix regex syntax error. Thanks to Brian K. White for spotting this straight-up syntax error of a missing ), in the regex handling the special case of &splitlines when it findss a word in its input string too long to fit in the specified output line width. Apparently in all my own uses of &splitline I'd never exercised that special-case code path before. --- mkfiles.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkfiles.pl b/mkfiles.pl index a19cec5d..8a63c65d 100755 --- a/mkfiles.pl +++ b/mkfiles.pl @@ -364,7 +364,7 @@ sub splitline { $len = (defined $width ? $width : 76); $splitchar = (defined $splitchar ? $splitchar : '\\'); while (length $line > $len) { - $line =~ /^(.{0,$len})\s(.*)$/ or $line =~ /^(.{$len,}?\s(.*)$/; + $line =~ /^(.{0,$len})\s(.*)$/ or $line =~ /^(.{$len,})?\s(.*)$/; $result .= $1; $result .= " ${splitchar}\n\t\t" if $2 ne ''; $line = $2;