Fix erroneous buffer handling in sha3-update again (fixes #3).

This commit is contained in:
2016-09-14 16:48:31 +02:00
parent e57d7c32cd
commit abe192b75f

View File

@ -110,7 +110,7 @@ and `end', which must be numeric bounding-indices."
#.*optimize-declaration*)
;; Handle potential remaining bytes
(unless (zerop buffer-index)
(let ((remainder (- (length buffer) buffer-index))
(let ((remainder (- rate-bytes buffer-index))
(length (- end start)))
(declare (type fixnum remainder length))
(replace buffer vector :start1 buffer-index :start2 start :end2 end)