From ea5d755488be5c353d266e5ef9666e9e13457f17 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 13 Apr 2020 14:30:49 +0000 Subject: A NUL byte cannot be mistaken for a trail byte. --- generic/tclUtil.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 15b67b9..82ef9b7 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -1625,11 +1625,6 @@ TclTrimLeft( const char *q = trim; int bytesLeft = numTrim; - /* take care about real length of char, e.g. if TclUtfToUniChar would - * mistakenly consider NTS 0-byte as a continuation of invalid utf-8 - * sequence, bug [c61818e4c9] */ - if (pInc > numBytes) {pInc = numBytes;} - /* Inner loop: scan trim string for match to current character */ do { Tcl_UniChar ch2; -- cgit v0.12