Fix bounding problem with cl-subseq on pkgfile.

Previously cl-subseq didn't complain about bounding indices. It has become more strict so we need to make sure not to try to take a subsequence past the end of the length of pkgfile-info.

Fixes #2606
This commit is contained in:
Donald Curtis 2015-03-18 22:07:52 -07:00
parent b7f62ac156
commit aa6427ca25

View file

@ -749,7 +749,7 @@ Optionally PRETTY-PRINT the data."
(if (eq 'define-package (car package-def))
(let* ((pkgfile-info (cdr package-def))
(descr (nth 2 pkgfile-info))
(rest-plist (cl-subseq pkgfile-info 4))
(rest-plist (cl-subseq pkgfile-info (min 4 (length pkgfile-info))))
(extras (let (alist)
(while rest-plist
(unless (memq (car rest-plist) '(:kind :archive))