aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2009-06-16 01:17:10 +0000
committerKenichi Handa2009-06-16 01:17:10 +0000
commit9c6d2887cd59552a64247426dbfddfc8a610b2ee (patch)
treeae625063710a43124a357e3bb3702a0212236c7c /src
parentc8e98fdb17423dcef3812968f751569152650f77 (diff)
downloademacs-9c6d2887cd59552a64247426dbfddfc8a610b2ee.tar.gz
emacs-9c6d2887cd59552a64247426dbfddfc8a610b2ee.zip
(detect_coding_utf_16): Fix the logic of rejecting
UTF-16 by checking the dispersion of Eth and Oth bytes.
Diffstat (limited to 'src')
-rw-r--r--src/coding.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/coding.c b/src/coding.c
index 8c43929693e..8d90297db0f 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -1677,14 +1677,14 @@ detect_coding_utf_16 (coding, detect_info)
1677 { 1677 {
1678 e[c1] = 1; 1678 e[c1] = 1;
1679 e_num++; 1679 e_num++;
1680 if (e_num >= 128) 1680 if (e_num >= 128 && o_num >= 128)
1681 break; 1681 break;
1682 } 1682 }
1683 if (! o[c2]) 1683 if (! o[c2])
1684 { 1684 {
1685 o[c2] = 1; 1685 o[c2] = 1;
1686 o_num++; 1686 o_num++;
1687 if (o_num >= 128) 1687 if (e_num >= 128 && o_num >= 128)
1688 break; 1688 break;
1689 } 1689 }
1690 } 1690 }