Revert "Fixes #12187 (#12321)" (#12447)

This reverts commit 00c31e8766.
This commit is contained in:
Andreas Rumpf 2019-10-18 15:59:22 +02:00 • committed by GitHub
commit 889b745b2b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 21 additions and 44 deletions

View file

@ -712,7 +712,7 @@ proc md5_File*(file: string): string {.raises: [IOError,Exception].} =
discard md5_Init(ctx)
while(let bytes = f.readChars(buf, 0, sz); bytes > 0):
discard md5_Update(ctx, buf[0].addr, csize bytes)
discard md5_Update(ctx, buf[0].addr, bytes)
discard md5_Final(buf[0].addr, ctx)
f.close
@ -731,7 +731,7 @@ proc md5_Str*(str: string): string =
var i = 0
while i < str.len:
let L = min(str.len - i, 512)
discard md5_Update(ctx, input[i].addr, csize L)
discard md5_Update(ctx, input[i].addr, L)
i += L
discard md5_Final(addr res, ctx)