diff options
| author | Kenichi Handa | 2008-06-25 02:48:03 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2008-06-25 02:48:03 +0000 |
| commit | 9a9d8a8fa7018891b9f17587c2019f2e75394dc4 (patch) | |
| tree | fc9abaca1f85bf85dc6c9685fd29aa896bbfecbe | |
| parent | e53ac7180fb7c29d7577a7b93f28e3de00e65e16 (diff) | |
| download | emacs-9a9d8a8fa7018891b9f17587c2019f2e75394dc4.tar.gz emacs-9a9d8a8fa7018891b9f17587c2019f2e75394dc4.zip | |
(image-jpeg-p): Convert DATA to unibyte at first.
| -rw-r--r-- | lisp/image.el | 1 |
1 files changed, 1 insertions, 0 deletions
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 | |||
| 208 | (defun image-jpeg-p (data) | 208 | (defun image-jpeg-p (data) |
| 209 | "Value is non-nil if DATA, a string, consists of JFIF image data. | 209 | "Value is non-nil if DATA, a string, consists of JFIF image data. |
| 210 | We accept the tag Exif because that is the same format." | 210 | We accept the tag Exif because that is the same format." |
| 211 | (setq data (string-to-unibyte data)) | ||
| 211 | (when (string-match "\\`\xff\xd8" data) | 212 | (when (string-match "\\`\xff\xd8" data) |
| 212 | (catch 'jfif | 213 | (catch 'jfif |
| 213 | (let ((len (length data)) (i 2)) | 214 | (let ((len (length data)) (i 2)) |