summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-11-30 21:52:43 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-11-30 21:52:43 (GMT)
commitad26cd45f04d3631ec265d5c248da3c1efd67718 (patch)
treea75377012e2461680ae38f6f56e7cebad848dd12 /generic
parent4e8c59e74d4386204c4d53b5e8dfb2cbe9cd770c (diff)
downloadtk-ad26cd45f04d3631ec265d5c248da3c1efd67718.zip
tk-ad26cd45f04d3631ec265d5c248da3c1efd67718.tar.gz
tk-ad26cd45f04d3631ec265d5c248da3c1efd67718.tar.bz2
Oops
Diffstat (limited to 'generic')
-rw-r--r--generic/tkIcu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tkIcu.c b/generic/tkIcu.c
index 1e24698..cce440b 100644
--- a/generic/tkIcu.c
+++ b/generic/tkIcu.c
@@ -115,7 +115,7 @@ startEndOfCmd(
if (idx > 0 && len != ulen) {
/* The string contains codepoints > \uFFFF. Determine UTF-16 index */
Tcl_Size newIdx = 0;
- for (Tcl_Size i = 0; i < index; i++) {
+ for (Tcl_Size i = 0; i < idx; i++) {
newIdx += 1 + (((newIdx < (Tcl_Size)len-1) && (ustr[newIdx]&0xFC00) == 0xD800) && ((ustr[newIdx+1]&0xFC00) == 0xDC00));
}
idx = newIdx;