Skip to content

Commit c8c05ca

Browse files
author
Noam Preil
committed
Fix scas_read
1 parent bc1bb93 commit c8c05ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

common/io.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
void scas_read(void *ptr, size_t size, size_t nmemb, FILE *stream) {
55
const unsigned read = fread(ptr, size, nmemb, stream);
6-
if (read != nmemb * size) {
7-
scas_abort("File read returned %d, %d expected", read, nmemb * size);
6+
if (read != nmemb) {
7+
scas_abort("File read returned %d, %d expected", read * size, nmemb * size);
88
}
99
}

0 commit comments

Comments
 (0)