Speicher ist billig. Daher viel, viel, viel mehr Filehandles, um das

Problem mit "out of range" endlich totzuschlagen.
This commit is contained in:
Yamagi Burmeister 2010-01-27 14:29:14 +00:00
parent eb96b14262
commit ffd7ff5bb9

View file

@ -30,7 +30,7 @@
* ============================================================================= * =============================================================================
*/ */
#define MAX_HANDLES 256 #define MAX_HANDLES 1024
#define MAX_READ 0x10000 #define MAX_READ 0x10000
#define MAX_WRITE 0x10000 #define MAX_WRITE 0x10000
#define MAX_FIND_FILES 0x04000 #define MAX_FIND_FILES 0x04000
@ -313,7 +313,9 @@ fsHandle_t *
FS_GetFileByHandle(fileHandle_t f) FS_GetFileByHandle(fileHandle_t f)
{ {
if (f <= 0 || f > MAX_HANDLES) if (f <= 0 || f > MAX_HANDLES)
{
Com_Error(ERR_DROP, "FS_GetFileByHandle: out of range"); Com_Error(ERR_DROP, "FS_GetFileByHandle: out of range");
}
return (&fs_handles[f - 1]); return (&fs_handles[f - 1]);
} }