From 628d49975080112c4eafa0318f20791b1e87ac73 Mon Sep 17 00:00:00 2001 From: "Pierre R. Mai" Date: Mon, 15 Oct 2012 02:30:28 +0200 Subject: [PATCH] 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. --- md5.lisp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/md5.lisp b/md5.lisp index 5ac5a16..5b8d4f8 100644 --- a/md5.lisp +++ b/md5.lisp @@ -410,8 +410,11 @@ bounded by start and end, which must be numeric bounding-indices." (update-md5-block regs block) (setq new-index 0)) (when (>= start end) - (setf (md5-state-buffer-index state) new-index) - (incf (md5-state-amount state) length) + (setf (md5-state-buffer-index state) new-index + (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))))) ;; Handle main-part and new-rest (etypecase sequence