Commit 81cd7687 authored by Kenichi Handa's avatar Kenichi Handa
Browse files

(detect_coding_mask): Fix previous change.

parent 6671cab3
2008-01-11 Kenichi Handa <handa@ni.aist.go.jp>
* coding.c (detect_coding_mask): Fix previous change.
2008-01-10 Chong Yidong <cyd@stupidchicken.com>
* process.c (wait_reading_process_output): Check for window
......
......@@ -4153,12 +4153,16 @@ detect_coding_mask (source, src_bytes, priorities, skip, multibytep)
label_loop_detect_coding:
null_byte_found = 0;
while (src < src_end && ascii_skip_code[*src])
/* We stop this loop before the last byte because it may be a NULL
anchor byte. */
while (src < src_end - 1 && ascii_skip_code[*src])
null_byte_found |= (! *src++);
if (! null_byte_found)
if (ascii_skip_code[*src])
src++;
else if (! null_byte_found)
{
unsigned char *p = src + 1;
while (p < src_end)
while (p < src_end - 1)
null_byte_found |= (! *p++);
}
*skip = src - source;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment