fixed FS_FileForHandle's range check

This commit is contained in:
myT 2022-11-04 04:36:05 +01:00
parent 2fd422c053
commit 439177057c

View file

@ -327,8 +327,8 @@ static fileHandle_t FS_HandleForFile()
static FILE* FS_FileForHandle( fileHandle_t f )
{
if ( f < 0 || f > MAX_FILE_HANDLES ) {
Com_Error( ERR_DROP, "FS_FileForHandle: out of reange" );
if ( f < 0 || f >= MAX_FILE_HANDLES ) {
Com_Error( ERR_DROP, "FS_FileForHandle: out of range" );
}
if (fsh[f].zipFile == qtrue) {
Com_Error( ERR_DROP, "FS_FileForHandle: can't get FILE on zip file" );