aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
authorKenichi Handa2009-01-15 07:13:39 +0000
committerKenichi Handa2009-01-15 07:13:39 +0000
commit4cddb209b41bea927090ec9c7b0f3a235964586a (patch)
tree17907cc0fc6da5984b649872c65811b781a7fef0 /src/coding.c
parent0abcd9a8af863b1ceb2cc3b617f60475477da22f (diff)
downloademacs-4cddb209b41bea927090ec9c7b0f3a235964586a.tar.gz
emacs-4cddb209b41bea927090ec9c7b0f3a235964586a.zip
(detect_coding_system): Fix handling of null_byte_fount.
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/coding.c b/src/coding.c
index 21c59454346..8c7ddf34db2 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -7905,10 +7905,11 @@ detect_coding_system (src, src_chars, src_bytes, highest, multibytep,
7905 } 7905 }
7906 } 7906 }
7907 7907
7908 if ((detect_info.rejected & CATEGORY_MASK_ANY) == CATEGORY_MASK_ANY) 7908 if ((detect_info.rejected & CATEGORY_MASK_ANY) == CATEGORY_MASK_ANY
7909 || null_byte_found)
7909 { 7910 {
7910 detect_info.found = CATEGORY_MASK_RAW_TEXT; 7911 detect_info.found = CATEGORY_MASK_RAW_TEXT;
7911 id = coding_categories[coding_category_raw_text].id; 7912 id = CODING_SYSTEM_ID (Qno_conversion);
7912 val = Fcons (make_number (id), Qnil); 7913 val = Fcons (make_number (id), Qnil);
7913 } 7914 }
7914 else if (! detect_info.rejected && ! detect_info.found) 7915 else if (! detect_info.rejected && ! detect_info.found)