Fix md5-digest-for-port: Don't fail if the total number of bytes read from a port exactly matches the buffer size
This commit is contained in:
parent
89db21acf6
commit
ac0edb679b
|
@ -70,7 +70,9 @@
|
|||
(init-md5-context! context)
|
||||
(let lp ()
|
||||
(let ((got (read-block buffer 0 buffer-size port)))
|
||||
(cond ((< got buffer-size)
|
||||
(cond ((eof-object? got)
|
||||
(md5-context->md5-digest context))
|
||||
((< got buffer-size)
|
||||
(if (not (eof-object? (peek-char port)))
|
||||
(error "read-block didn't read port to the end"))
|
||||
(update-md5-context! context (substring buffer 0 got))
|
||||
|
|
Loading…
Reference in New Issue