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:
parent
ee4341de51
commit
4b3314ff48
1 changed files with 1 additions and 1 deletions
2
md5.c
2
md5.c
|
@ -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);
|
||||||
|
|
Loading…
Add table
Reference in a new issue