From 6e23ca1d3eea0d104cbda84fd2f305f8d4de68dc Mon Sep 17 00:00:00 2001 From: Will Andrews Date: Tue, 16 Jan 2001 23:11:38 +0000 Subject: Fix off-by-one error that was causing an infinite loop in some very weird cases. AAARGGH!!! Discovered by: will, sobomax, alex Fix by: Dima Dorfman --- Tools/scripts/addport | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/scripts/addport b/Tools/scripts/addport index c4b3042bc3df..fbfa4404f682 100755 --- a/Tools/scripts/addport +++ b/Tools/scripts/addport @@ -240,7 +240,7 @@ foreach my $thisdir (@dirs) { $tmp = 0; # Until we reach the offset, record the number of words. while ($tmp < $offset) { - $tmp += length($commentArr[$tmp2]); + $tmp += length($commentArr[$tmp2]) + 1; $tmp2++; } $tmp2--; -- cgit v1.2.3