Open smallmodel opened 2 months ago
Yeah, it seems incorrect. Though it's the original Quake 3 behavior and changing it could potentially affect mod compatibility. Code can reliably check if FS_Seek() return value is more or equal to 0 for success and less than 0 for failure.
Code similar to #691 was the reason why I was asking (from another engine based on quake3), but now it's clear that result < 0 = error.
I think a small note above the FS_Seek
function telling On success, it returns 0 or a positive value indicating the offset. On failure it returns a negative value indicating the error code
could help, up to you.
Hello,
https://github.com/ioquake/ioq3/blob/main/code/qcommon/files.c#L1694
When the file is inside a zip file,
FS_Seek
returns the requested offset. But when it's on the file system,FS_Seek
returns the result offseek
, which is 0 on success. Is this correct? This looks like a mistake to me, it should always return 0 on success, and nonzero on failure.