]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix range-error in image-dired.el
authorEli Zaretskii <eliz@gnu.org>
Mon, 16 Oct 2017 16:25:01 +0000 (19:25 +0300)
committerEli Zaretskii <eliz@gnu.org>
Mon, 16 Oct 2017 16:25:01 +0000 (19:25 +0300)
* lisp/image-dired.el (image-dired-create-thumb-1): Avoid
overflowing an Emacs integer on 32-bit hosts.  (Bug#28809)

lisp/image-dired.el

index f48f1a1b874e7bae0f6eaf90d93339fefee3823a..30ecc2befc72e503b5eefe778bfd823ced212beb 100644 (file)
@@ -748,7 +748,10 @@ Increase at own risk.")
    'image-dired-cmd-create-thumbnail-program)
   (let* ((width (int-to-string (image-dired-thumb-size 'width)))
          (height (int-to-string (image-dired-thumb-size 'height)))
-         (modif-time (floor (float-time (nth 5 (file-attributes original-file)))))
+         (modif-time
+          (format "%.0f"
+                  (ffloor (float-time
+                           (nth 5 (file-attributes original-file))))))
          (thumbnail-nq8-file (replace-regexp-in-string ".png\\'" "-nq8.png"
                                                        thumbnail-file))
          (spec