Commit 07e835ff authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

winebuild: Open resource files in binary mode.

parent 40089435
......@@ -168,7 +168,7 @@ void load_res16_file( const char *name, DLLSPEC *spec )
void *base;
struct stat st;
if ((fd = open( name, O_RDONLY )) == -1) fatal_perror( "Cannot open %s", name );
if ((fd = open( name, O_RDONLY | O_BINARY )) == -1) fatal_perror( "Cannot open %s", name );
if ((fstat( fd, &st ) == -1)) fatal_perror( "Cannot stat %s", name );
if (!st.st_size) fatal_error( "%s is an empty file\n", name );
#ifdef HAVE_MMAP
......
......@@ -269,7 +269,7 @@ int load_res32_file( const char *name, DLLSPEC *spec )
void *base;
struct stat st;
if ((fd = open( name, O_RDONLY )) == -1) fatal_perror( "Cannot open %s", name );
if ((fd = open( name, O_RDONLY | O_BINARY )) == -1) fatal_perror( "Cannot open %s", name );
if ((fstat( fd, &st ) == -1)) fatal_perror( "Cannot stat %s", name );
if (!st.st_size) fatal_error( "%s is an empty file\n", name );
#ifdef HAVE_MMAP
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment