summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2011-05-11 11:38:15 -0600
committerKarl Williamson <public@khwilliamson.com>2011-05-19 10:31:20 -0600
commit508f7cfaca1a9a559de9b56ba489e1f4ec3519a7 (patch)
treed003070ef3cbdf66e2598beff57cc255ff645cf5 /utf8.c
parent5f01d9365bc1313f70004c23768019096470d4e2 (diff)
downloadperl-508f7cfaca1a9a559de9b56ba489e1f4ec3519a7.tar.gz
utf8.c: "<" should be "<="
av_len() is misnamed, and hence led me earlier to stop the loop one shy of what it should have been. No actual bugs were caused by this, but it could cause a duplicate entry in an array, which is searched linearly, hence a slight slowdown.
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/utf8.c b/utf8.c
index 11c2fa40bd..371db53092 100644
--- a/utf8.c
+++ b/utf8.c
@@ -2702,7 +2702,7 @@ Perl__swash_inversion_hash(pTHX_ SV* const swash)
}
}
- for (i = 0; i < av_len(list); i++) {
+ for (i = 0; i <= av_len(list); i++) {
SV** entryp = av_fetch(list, i, FALSE);
SV* entry;
if (entryp == NULL) {