diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-05-11 10:03:46 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-05-11 10:03:46 (GMT) |
commit | 783b10ecec013f3f096ca5cc2f56b628db6b2fce (patch) | |
tree | 622d0745609e0bf4654f83420d17343a937db37e /generic | |
parent | 429a4171cb6436a84c7923dcac6ef6fe3460ce20 (diff) | |
download | tcl-783b10ecec013f3f096ca5cc2f56b628db6b2fce.zip tcl-783b10ecec013f3f096ca5cc2f56b628db6b2fce.tar.gz tcl-783b10ecec013f3f096ca5cc2f56b628db6b2fce.tar.bz2 |
Tweak the Tcl_UtfPrev() implementation for TCL_UTF_MAX=4. This fixes 10 testcases in 4 groups (utf-7.10, utf-7.15, utf-7.40 and utf-7.48) , where Tcl_UtfPrev() didn't jump to the beginning of the UTF-8 character, even though there was no limitation which prevented that. So, this is actually a bug-fix for the TIP #389 implementation.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclUtf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclUtf.c b/generic/tclUtf.c index a6dfb8a..9596aed 100644 --- a/generic/tclUtf.c +++ b/generic/tclUtf.c @@ -857,7 +857,7 @@ Tcl_UtfPrev( * it (the fallback) is correct. */ - || (trailBytesSeen >= totalBytes[byte])) { + || (trailBytesSeen >= complete[byte])) { /* * That is, (1 + trailBytesSeen > needed). * We've examined more bytes than needed to complete |