From 5450bd8d59dbd475f765c87bf428a2adcaeece94 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Sat, 25 Oct 2014 01:45:42 -0700 Subject: [PATCH] Force files into binary mode on Windows --- src/util/vfs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/util/vfs.c b/src/util/vfs.c index 665cd9cd7..14b2af2fc 100644 --- a/src/util/vfs.c +++ b/src/util/vfs.c @@ -42,6 +42,9 @@ struct VFile* VFileOpen(const char* path, int flags) { if (!path) { return 0; } +#ifdef _WIN32 + flags |= O_BINARY; +#endif int fd = open(path, flags, 0666); return VFileFromFD(fd); }