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

db4
Doug Coleman 2009-09-28 18:58:20 -05:00
parent 9b64d206ff
commit 98546d6c8f
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 over bytes>> [ push-all ] keep
[ dup length pick block-size>> >= ] [ dup length pick block-size>> >= ]
[ [
64 cut-slice [ >byte-array ] dip [ over block-size>> cut-slice [ >byte-array ] dip [
over [ checksum-block ] over [ checksum-block ]
[ [ 64 + ] change-bytes-read drop ] bi [ [ ] [ block-size>> ] bi [ + ] curry change-bytes-read drop ] bi
] dip ] dip
] while ] while
>byte-vector >byte-vector