aboutsummaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorwill <will@FreeBSD.org>2001-01-17 07:11:38 +0800
committerwill <will@FreeBSD.org>2001-01-17 07:11:38 +0800
commit3a8f9d9d1dae2330628fc6af217953d83b38e68c (patch)
treebb17761ba8fd29ea200887db116bb2de47c307c4 /Tools
parent9b324ba5e4bd249fe2b301cdf8168851e8dd3429 (diff)
downloadfreebsd-ports-gnome-3a8f9d9d1dae2330628fc6af217953d83b38e68c.tar.gz
freebsd-ports-gnome-3a8f9d9d1dae2330628fc6af217953d83b38e68c.tar.zst
freebsd-ports-gnome-3a8f9d9d1dae2330628fc6af217953d83b38e68c.zip
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 <dima@unixfreak.org>
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/scripts/addport2
1 files changed, 1 insertions, 1 deletions
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--;