Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Tcl_NumUtfChars counts wrong at end of malformed string

Closed / Fixedb2816a3afe4b11f5644b75e6daff28199031ec95Created 7 years agoUpdated 7 years ago
Descriptionplain2020-05-07 18:55:49
==== utf-4.13 Tcl_NumUtfChars: end of string FAILED
==== Contents of test case:
 
    testnumutfchars foobar[testbytestring \xF2\xC2\xA0] end

---- Result was:
9
---- Result should have been (exact matching):
8
==== utf-4.13 FAILED

The algorithm in Tcl_NumUtfChars can go wrong only when TCL _UTF_MAX > 3
so that there is room to make certain troubles possible.
Referenced by2
dgpplain2020-05-07 19:09:47
Fix checked in. Merging to follow.
Log in (anonymous is fine) to add a comment.