avoid Windows perform newline translation (#4128)

This commit is contained in:
TianlongLiang
2025-03-07 08:22:12 +08:00
committed by GitHub
parent 412631ac13
commit 48a87dc8bf

View File

@ -15,7 +15,7 @@ read_file_to_buffer(const char *filename, int *ret_size)
FILE *file; FILE *file;
int file_size, read_size; int file_size, read_size;
if (!(file = fopen(filename, "r"))) if (!(file = fopen(filename, "rb")))
return NULL; return NULL;
fseek(file, 0, SEEK_END); fseek(file, 0, SEEK_END);