Fixed Windows build.

This commit is contained in:
Leonardo Zide 2017-03-18 10:17:32 -07:00
parent d6efc97089
commit 657df22db7

View file

@ -212,7 +212,7 @@ void lcDiskFile::SetLength(size_t NewLength)
size_t lcDiskFile::GetLength() const
{
struct stat st;
if (fstat(fileno(mFile), &st) < 0 || !S_ISREG(st.st_mode))
if (fstat(fileno(mFile), &st) < 0 || (st.st_mode & S_IFMT) == S_IFREG)
return 0;
return st.st_size;