Skip to content

Commit

Permalink
Open pbm file in binary mode
Browse files Browse the repository at this point in the history
- Fix corrupted binary file on windows

(cherry picked from commit e166506)
  • Loading branch information
acgaudette committed Jul 5, 2021
1 parent 8e7dbfa commit 7cf0923
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ static unsigned char *read_font() // Read custom PBM file
{
errno = 0;
strncpy(filename, "font.pbm", 8 + 1);
FILE *file = fopen(root_path, "r");
FILE *file = fopen(root_path, "rb");
if (errno) {
fprintf(
stderr,
Expand Down

0 comments on commit 7cf0923

Please sign in to comment.