]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - fs.c
Fixed FS_Seek for unpacked files when FS_USESYSCALLS is defined (should fix HalfLife...
[xonotic/darkplaces.git] / fs.c
diff --git a/fs.c b/fs.c
index 2f00c1ea34ba7a5bddfea17ec6f3d8ef974376d4..6544ff766be302692ca6e2188283ad73203d251d 100644 (file)
--- a/fs.c
+++ b/fs.c
@@ -1627,7 +1627,11 @@ int FS_Seek (qfile_t* file, long offset, int whence)
        // Quick path for unpacked files
        if (! (file->flags & FS_FLAG_PACKED))
 #ifdef FS_USESYSCALLS
-               return lseek (file->stream, offset, whence);
+       {
+               if (lseek (file->stream, offset, whence) == -1)
+                       return -1;
+               return 0;
+       }
 #else
                return fseek (file->stream, offset, whence);
 #endif