Ensure fix for small blocks works with md5-small-length feature.

Based on my different fix for the small blocks issue, which got
integrated into cl-md5 but not sbcl.
This commit is contained in:
2012-10-15 02:30:28 +02:00
parent 3dfb0b9be4
commit 628d499750

View File

@ -410,8 +410,11 @@ bounded by start and end, which must be numeric bounding-indices."
(update-md5-block regs block) (update-md5-block regs block)
(setq new-index 0)) (setq new-index 0))
(when (>= start end) (when (>= start end)
(setf (md5-state-buffer-index state) new-index) (setf (md5-state-buffer-index state) new-index
(incf (md5-state-amount state) length) (md5-state-amount state)
#-md5-small-length (+ (md5-state-amount state) length)
#+md5-small-length (the (unsigned-byte 29)
(+ (md5-state-amount state) length)))
(return-from update-md5-state state))))) (return-from update-md5-state state)))))
;; Handle main-part and new-rest ;; Handle main-part and new-rest
(etypecase sequence (etypecase sequence