Force files into binary mode on Windows

This commit is contained in:
Jeffrey Pfau 2014-10-25 01:45:42 -07:00
parent c7a1894a99
commit 5450bd8d59
1 changed files with 3 additions and 0 deletions

View File

@ -42,6 +42,9 @@ struct VFile* VFileOpen(const char* path, int flags) {
if (!path) { if (!path) {
return 0; return 0;
} }
#ifdef _WIN32
flags |= O_BINARY;
#endif
int fd = open(path, flags, 0666); int fd = open(path, flags, 0666);
return VFileFromFD(fd); return VFileFromFD(fd);
} }