# HG changeset patch # User Kenichi Handa # Date 1214362083 0 # Node ID 1c3bafe6e81633bf61603615e72ccd43a26f79fe # Parent 8c22ce277d5d177179a7141b965ea0c108bfbd5c (image-jpeg-p): Convert DATA to unibyte at first. diff -r 8c22ce277d5d -r 1c3bafe6e816 lisp/image.el --- 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))