mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
set the file mode before seeking
This commit is contained in:
parent
4d74b80a38
commit
01228a8be0
1 changed files with 3 additions and 3 deletions
|
@ -332,6 +332,9 @@ COM_OpenRead (const char *path, int offs, int len, int zip)
|
|||
Sys_Error ("Couldn't open %s", path);
|
||||
return 0;
|
||||
}
|
||||
#ifdef WIN32
|
||||
setmode (fd, O_BINARY);
|
||||
#endif
|
||||
if (offs < 0 || len < 0) {
|
||||
// normal file
|
||||
offs = 0;
|
||||
|
@ -353,9 +356,6 @@ COM_OpenRead (const char *path, int offs, int len, int zip)
|
|||
lseek (fd, offs, SEEK_SET);
|
||||
com_filesize = len;
|
||||
|
||||
#ifdef WIN32
|
||||
setmode (fd, O_BINARY);
|
||||
#endif
|
||||
if (zip)
|
||||
return Qdopen (fd, "rbz");
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue