gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit 78855eb6fef33210ca7efcab2b8dfd2db5230a42 parent 24fc5273c0cd4838a8d538f0602489cd1995ae30 Author: bbbbbr <bbbbbr@users.noreply.github.com> Date: Sat, 4 Jun 2022 16:33:29 -0700 Merge pull request #357 from bbbbbr/gbcompress_fix_read_size_error Gbcompress fix read size error Diffstat:
| M | gbdk-support/gbcompress/files.c | 4 | +++- |
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/gbdk-support/gbcompress/files.c b/gbdk-support/gbcompress/files.c @@ -66,7 +66,9 @@ bool file_write_from_buffer(char * filename, uint8_t * p_buf, uint32_t data_len) char * file_read_into_buffer_char(char * filename, uint32_t *ret_size) { long fsize; - FILE * file_in = fopen(filename, "r"); + // On windows windows fread() will auto-translate CRLF to just LF and + // report it as one byte read, messing up the size check + FILE * file_in = fopen(filename, "rb"); char * filedata = NULL; if (file_in) {
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.