Fix parenthesis goof in the revised file-MD5ing code.

Every block I read was being condensed down to one byte.
This commit is contained in:
Simon Tatham 2017-05-18 18:49:00 +01:00
parent ee4341de51
commit 4b3314ff48

2
md5.c
View file

@ -249,7 +249,7 @@ uint32_t MsiGetFileHashW(const char16_t *filename, uint32_t options,
MD5Init(&ctx); MD5Init(&ctx);
while ((retd = read(fd, buffer, sizeof(buffer)) > 0)) while ((retd = read(fd, buffer, sizeof(buffer))) > 0)
MD5Update(&ctx, buffer, retd); MD5Update(&ctx, buffer, retd);
if (retd < 0) { if (retd < 0) {
warnx("MsiGetFileHash(%s) -> ERROR_READ_FAULT", fname); warnx("MsiGetFileHash(%s) -> ERROR_READ_FAULT", fname);