From: Kenichi Handa Date: Wed, 25 Jun 2008 02:48:03 +0000 (+0000) Subject: (image-jpeg-p): Convert DATA to unibyte at first. X-Git-Tag: emacs-pretest-23.0.90~4526 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9a9d8a8fa7018891b9f17587c2019f2e75394dc4;p=emacs.git (image-jpeg-p): Convert DATA to unibyte at first. --- diff --git a/lisp/image.el b/lisp/image.el index 4969f8a4762..7dfa0d4a327 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -208,6 +208,7 @@ compatibility with versions of Emacs that lack the variable (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))