mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-20 20:50:53 -08:00
(detect_coding_iso2022): While checking a byte sequence
for CODING_CATEGORY_MASK_ISO_8_2, if we read one extra byte, check it in the normal loop.
This commit is contained in:
parent
5483cd4e0f
commit
8d239c89c6
1 changed files with 6 additions and 0 deletions
|
|
@ -1349,6 +1349,7 @@ detect_coding_iso2022 (src, src_end, multibytep)
|
|||
while (mask && src < src_end)
|
||||
{
|
||||
ONE_MORE_BYTE_CHECK_MULTIBYTE (c, multibytep);
|
||||
retry:
|
||||
switch (c)
|
||||
{
|
||||
case ISO_CODE_ESC:
|
||||
|
|
@ -1523,6 +1524,8 @@ detect_coding_iso2022 (src, src_end, multibytep)
|
|||
&& mask & CODING_CATEGORY_MASK_ISO_8_2)
|
||||
{
|
||||
int i = 1;
|
||||
|
||||
c = -1;
|
||||
while (src < src_end)
|
||||
{
|
||||
ONE_MORE_BYTE_CHECK_MULTIBYTE (c, multibytep);
|
||||
|
|
@ -1535,6 +1538,9 @@ detect_coding_iso2022 (src, src_end, multibytep)
|
|||
mask &= ~CODING_CATEGORY_MASK_ISO_8_2;
|
||||
else
|
||||
mask_found |= CODING_CATEGORY_MASK_ISO_8_2;
|
||||
if (c >= 0)
|
||||
/* This means that we have read one extra byte. */
|
||||
goto retry;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue