Merge branch 'master' of https://github.com/raa-eruanna/qzdoom into qzdoom

This commit is contained in:
Magnus Norddahl 2016-10-17 00:20:31 +02:00
commit c706d5465a

View file

@ -123,7 +123,8 @@ int M_ReadFile (char const *name, BYTE **buffer)
handle = open (name, O_RDONLY | O_BINARY, 0666); handle = open (name, O_RDONLY | O_BINARY, 0666);
if (handle == -1) if (handle == -1)
I_Error ("Couldn't read file %s", name); I_Error ("Couldn't read file %s", name);
if (fstat (handle,&fileinfo) == -1) // [BL] Use stat instead of fstat for v140_xp hack
if (stat (name,&fileinfo) == -1)
I_Error ("Couldn't read file %s", name); I_Error ("Couldn't read file %s", name);
length = fileinfo.st_size; length = fileinfo.st_size;
buf = new BYTE[length]; buf = new BYTE[length];
@ -149,7 +150,8 @@ int M_ReadFileMalloc (char const *name, BYTE **buffer)
handle = open (name, O_RDONLY | O_BINARY, 0666); handle = open (name, O_RDONLY | O_BINARY, 0666);
if (handle == -1) if (handle == -1)
I_Error ("Couldn't read file %s", name); I_Error ("Couldn't read file %s", name);
if (fstat (handle,&fileinfo) == -1) // [BL] Use stat instead of fstat for v140_xp hack
if (stat (name,&fileinfo) == -1)
I_Error ("Couldn't read file %s", name); I_Error ("Couldn't read file %s", name);
length = fileinfo.st_size; length = fileinfo.st_size;
buf = (BYTE*)M_Malloc(length); buf = (BYTE*)M_Malloc(length);