svn commit: r341235 - stable/11/contrib/nvi/common
Yuri Pankov
yuripv at FreeBSD.org
Thu Nov 29 15:08:00 UTC 2018
Author: yuripv
Date: Thu Nov 29 15:07:59 2018
New Revision: 341235
URL: https://svnweb.freebsd.org/changeset/base/341235
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/11/contrib/nvi/common/encoding.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/contrib/nvi/common/encoding.c
==============================================================================
--- stable/11/contrib/nvi/common/encoding.c Thu Nov 29 15:05:47 2018 (r341234)
+++ stable/11/contrib/nvi/common/encoding.c Thu Nov 29 15:07:59 2018 (r341235)
@@ -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-all
mailing list