svn commit: r341234 - stable/12/contrib/nvi/common
Yuri Pankov
yuripv at FreeBSD.org
Thu Nov 29 15:05:48 UTC 2018
Author: yuripv
Date: Thu Nov 29 15:05:47 2018
New Revision: 341234
URL: https://svnweb.freebsd.org/changeset/base/341234
Log:
MFC r340976:
vi: fix UTF-8 detection.
PR: 202290
Submitted by: lampa at fit.vutbr.cz
Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D17950
Modified:
stable/12/contrib/nvi/common/encoding.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/contrib/nvi/common/encoding.c
==============================================================================
--- stable/12/contrib/nvi/common/encoding.c Thu Nov 29 14:49:33 2018 (r341233)
+++ stable/12/contrib/nvi/common/encoding.c Thu Nov 29 15:05:47 2018 (r341234)
@@ -96,7 +96,7 @@ looks_utf8(const char *ibuf, size_t nbytes)
if (i >= nbytes)
goto done;
- if (buf[i] & 0x40) /* 10xxxxxx */
+ if ((buf[i] & 0xc0) != 0x80) /* 10xxxxxx */
return -1;
}
More information about the svn-src-stable
mailing list