Add "b" (for "binary") to fopen calls

Updates #50
This commit is contained in:
Nigel Tao committed 2021-07-07 20:28:35 +10:00
1 parent d0451190ca
commit 816475b285
6 files changed
+6 -6

No files matched your search

+1 -1
View File
@@ -94,7 +94,7 @@ load_image(const char* filename) {
FILE* file = stdin;
const char* adj_filename = "<stdin>";
if (filename) {
FILE* f = fopen(filename, "r");
FILE* f = fopen(filename, "rb");
if (f == NULL) {
printf("%s: could not open file\n", filename);
return false;