From 9dd42be15f72b5128be823e6aeb0adafa3915486 Mon Sep 17 00:00:00 2001 From: Braden Obrzut Date: Sun, 16 Oct 2016 16:22:21 -0400 Subject: [PATCH] - Fixed: Demo playback on Windows XP since we don't patch fstat for v140_xp bug. --- src/m_misc.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/m_misc.cpp b/src/m_misc.cpp index 824fe0533d..c49b342ce0 100644 --- a/src/m_misc.cpp +++ b/src/m_misc.cpp @@ -123,7 +123,8 @@ int M_ReadFile (char const *name, BYTE **buffer) handle = open (name, O_RDONLY | O_BINARY, 0666); if (handle == -1) 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); length = fileinfo.st_size; buf = new BYTE[length]; @@ -149,7 +150,8 @@ int M_ReadFileMalloc (char const *name, BYTE **buffer) handle = open (name, O_RDONLY | O_BINARY, 0666); if (handle == -1) 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); length = fileinfo.st_size; buf = (BYTE*)M_Malloc(length);