Skip to content

Commit

Permalink
Adding small diagnostic to get info on #752
Browse files Browse the repository at this point in the history
* The written bmp files are truncated on big-endian MIPS64.
  • Loading branch information
DanBloomberg committed Oct 11, 2024
1 parent f479a27 commit 39121ac
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/bmpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,11 @@ size_t size, nbytes;
rewind(fp);
nbytes = fwrite(data, 1, size, fp);
free(data);
if (nbytes != size)
if (nbytes != size) {
L_ERROR("Truncation: nbytes = %zu, size = %zu\n",
__func__, nbytes, size);
return ERROR_INT("Write error", __func__, 1);
}
return 0;
}

Expand Down

0 comments on commit 39121ac

Please sign in to comment.