1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-22 21:50:45 -08:00

(detect_coding_utf_16): Fix the logic of rejecting

UTF-16 by checking the dispersion of Eth and Oth bytes.
This commit is contained in:
Kenichi Handa 2009-06-16 01:17:10 +00:00
parent c8e98fdb17
commit 9c6d2887cd

View file

@ -1677,14 +1677,14 @@ detect_coding_utf_16 (coding, detect_info)
{
e[c1] = 1;
e_num++;
if (e_num >= 128)
if (e_num >= 128 && o_num >= 128)
break;
}
if (! o[c2])
{
o[c2] = 1;
o_num++;
if (o_num >= 128)
if (e_num >= 128 && o_num >= 128)
break;
}
}