From ffd7ff5bb9b66b190ed903df28e07b4bbe2e5df9 Mon Sep 17 00:00:00 2001 From: Yamagi Burmeister Date: Wed, 27 Jan 2010 14:29:14 +0000 Subject: [PATCH] Speicher ist billig. Daher viel, viel, viel mehr Filehandles, um das Problem mit "out of range" endlich totzuschlagen. --- src/common/files.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/files.c b/src/common/files.c index e990524a..075f230a 100644 --- a/src/common/files.c +++ b/src/common/files.c @@ -30,7 +30,7 @@ * ============================================================================= */ -#define MAX_HANDLES 256 +#define MAX_HANDLES 1024 #define MAX_READ 0x10000 #define MAX_WRITE 0x10000 #define MAX_FIND_FILES 0x04000 @@ -313,7 +313,9 @@ fsHandle_t * FS_GetFileByHandle(fileHandle_t f) { if (f <= 0 || f > MAX_HANDLES) + { Com_Error(ERR_DROP, "FS_GetFileByHandle: out of range"); + } return (&fs_handles[f - 1]); }