]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix bug #15426 with directory-files invoked from a unibyte buffer.
authorEli Zaretskii <eliz@gnu.org>
Sat, 21 Sep 2013 11:48:19 +0000 (14:48 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 21 Sep 2013 11:48:19 +0000 (14:48 +0300)
 src/dired.c (directory_files_internal): Use multibyte_chars_in_text,
 not chars_in_text, whose result depends on the multibyteness of
 the current buffer.

src/ChangeLog
src/dired.c

index 7b59b33c8bdd0c9e38a700a134b4f93585aa3283..37e04f03c85f66b000a5c8d197b6d1e70c795585 100644 (file)
@@ -1,3 +1,9 @@
+2013-09-21  Eli Zaretskii  <eliz@gnu.org>
+
+       * dired.c (directory_files_internal): Use multibyte_chars_in_text,
+       not chars_in_text, whose result depends on the multibyteness of
+       the current buffer.  (Bug#15426)
+
 2013-09-20  Paul Eggert  <eggert@cs.ucla.edu>
 
        Port recent change to hosts where pointers aren't 'long'.
index 2b79b54f2a4c440f230c181beebe86beb57e57f8..1bdb171c4d0e2674a9c494124a6d7f29072a7adc 100644 (file)
@@ -278,7 +278,7 @@ directory_files_internal (Lisp_Object directory, Lisp_Object full,
              memcpy (SDATA (fullname) + directory_nbytes + needsep,
                      SDATA (name), len);
 
-             nchars = chars_in_text (SDATA (fullname), nbytes);
+             nchars = multibyte_chars_in_text (SDATA (fullname), nbytes);
 
              /* Some bug somewhere.  */
              if (nchars > nbytes)