fix checksum protocol -- was hardcoded to a block size of 64

Doug Coleman 2009-09-28 18:58:20 -05:00
parent f9fef7d9e9
commit 9ee2a57045
1 changed files with 2 additions and 2 deletions

View File

@ -27,9 +27,9 @@ GENERIC: get-checksum ( checksum -- value )
over bytes>> [ push-all ] keep
[ dup length pick block-size>> >= ]
[
64 cut-slice [ >byte-array ] dip [
over block-size>> cut-slice [ >byte-array ] dip [
over [ checksum-block ]
[ [ 64 + ] change-bytes-read drop ] bi
[ [ ] [ block-size>> ] bi [ + ] curry change-bytes-read drop ] bi
] dip
] while
>byte-vector