changeset 96253:1c3bafe6e816

(image-jpeg-p): Convert DATA to unibyte at first.
author Kenichi Handa <handa@m17n.org>
date Wed, 25 Jun 2008 02:48:03 +0000
parents 8c22ce277d5d
children dd9a4766432a
files lisp/image.el
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/image.el	Wed Jun 25 02:45:50 2008 +0000
+++ b/lisp/image.el	Wed Jun 25 02:48:03 2008 +0000
@@ -208,6 +208,7 @@
 (defun image-jpeg-p (data)
   "Value is non-nil if DATA, a string, consists of JFIF image data.
 We accept the tag Exif because that is the same format."
+  (setq data (string-to-unibyte data))
   (when (string-match "\\`\xff\xd8" data)
     (catch 'jfif
       (let ((len (length data)) (i 2))