Mercurial > emacs
comparison src/coding.c @ 90243:c59afb15f5c6
(decode_coding): Fix handling of invalid bytes.
| author | Kenichi Handa <handa@m17n.org> |
|---|---|
| date | Sat, 15 Oct 2005 02:09:14 +0000 |
| parents | 8be9e4c6d687 |
| children | 7beb78bc1f8e |
comparison
equal
deleted
inserted
replaced
| 90242:5e2d3828e89f | 90243:c59afb15f5c6 |
|---|---|
| 6206 coding->charbuf_used = 0; | 6206 coding->charbuf_used = 0; |
| 6207 while (nbytes-- > 0) | 6207 while (nbytes-- > 0) |
| 6208 { | 6208 { |
| 6209 int c = *src++; | 6209 int c = *src++; |
| 6210 | 6210 |
| 6211 coding->charbuf[coding->charbuf_used++] = (c & 0x80 ? - c : c); | 6211 if (c & 0x80) |
| 6212 c = BYTE8_TO_CHAR (c); | |
| 6213 coding->charbuf[coding->charbuf_used++] = c; | |
| 6212 } | 6214 } |
| 6213 produce_chars (coding, Qnil, 1); | 6215 produce_chars (coding, Qnil, 1); |
| 6214 } | 6216 } |
| 6215 else | 6217 else |
| 6216 { | 6218 { |
