Commit 7893e589 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

(archive-arc-summarize, archive-lzh-summarize): Convert csize to integer when

computing offsets within the compressed archive file.
parent d7494911
2006-05-16 Eli Zaretskii <eliz@gnu.org>
* arc-mode.el (archive-arc-summarize, archive-lzh-summarize):
Convert csize to integer when computing offsets within the
compressed archive file.
2006-05-16 Kim F. Storm <storm@cua.dk> 2006-05-16 Kim F. Storm <storm@cua.dk>
   
* subr.el (add-to-history): Add KEEP-ALL arg and align functionality * subr.el (add-to-history): Add KEEP-ALL arg and align functionality
......
...@@ -1355,7 +1355,11 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." ...@@ -1355,7 +1355,11 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
visual) visual)
files (cons (vector efnname ifnname fiddle nil (1- p)) files (cons (vector efnname ifnname fiddle nil (1- p))
files) files)
p (+ p 29 csize)))) ;; p needs to stay an integer, since we use it in char-after
;; above. Passing through `round' limits the compressed size
;; to most-positive-fixnum, but if the compressed size exceeds
;; that, we cannot visit the archive anyway.
p (+ p 29 (round csize)))))
(goto-char (point-min)) (goto-char (point-min))
(let ((dash (concat "- -------- ----------- -------- " (let ((dash (concat "- -------- ----------- -------- "
(make-string maxlen ?-) (make-string maxlen ?-)
...@@ -1497,9 +1501,13 @@ This doesn't recover lost files, it just undoes changes in the buffer itself." ...@@ -1497,9 +1501,13 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
files (cons (vector prname ifnname fiddle mode (1- p)) files (cons (vector prname ifnname fiddle mode (1- p))
files)) files))
(cond ((= hdrlvl 1) (cond ((= hdrlvl 1)
(setq p (+ p hsize 2 csize))) ;; p needs to stay an integer, since we use it in goto-char
;; above. Passing through `round' limits the compressed size
;; to most-positive-fixnum, but if the compressed size exceeds
;; that, we cannot visit the archive anyway.
(setq p (+ p hsize 2 (round csize))))
((or (= hdrlvl 2) (= hdrlvl 0)) ((or (= hdrlvl 2) (= hdrlvl 0))
(setq p (+ p thsize 2 csize)))) (setq p (+ p thsize 2 (round csize)))))
)) ))
(goto-char (point-min)) (goto-char (point-min))
(set-buffer-multibyte default-enable-multibyte-characters) (set-buffer-multibyte default-enable-multibyte-characters)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment