diff src/coding.c @ 102058:4f60db600648

(Fcheck_coding_systems_region): Fix test for unibyte string.
author Andreas Schwab <schwab@suse.de>
date Mon, 16 Feb 2009 13:04:15 +0000
parents 4d3a5c88cb2b
children a5023e8bbb1e
line wrap: on
line diff
--- a/src/coding.c	Mon Feb 16 12:34:05 2009 +0000
+++ b/src/coding.c	Mon Feb 16 13:04:15 2009 +0000
@@ -8463,7 +8463,7 @@
 encodable, and the value contains indices to the string instead of
 buffer positions.  END is ignored.
 
-If the current buffer (or START if it is string) is unibyte, the value
+If the current buffer (or START if it is a string) is unibyte, the value
 is nil.  */)
      (start, end, coding_system_list)
      Lisp_Object start, end, coding_system_list;
@@ -8478,7 +8478,7 @@
   if (STRINGP (start))
     {
       if (!STRING_MULTIBYTE (start)
-	  && SCHARS (start) != SBYTES (start))
+	  || SCHARS (start) == SBYTES (start))
 	return Qnil;
       start_byte = 0;
       end_byte = SBYTES (start);