From 0cea019fcb5bb4890b6d67086c7ce8b82f5aca2b Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Wed, 16 Jun 2021 22:31:06 +0200 Subject: [PATCH] q3map2: increase VFS_MAXDIRS because multiple pakpaths with many pk3dirs can lead to high list of VFS directories --- tools/quake3/common/vfs.c | 1 + tools/quake3/common/vfs.h | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/quake3/common/vfs.c b/tools/quake3/common/vfs.c index 0bd6ed1e..d199d6c0 100644 --- a/tools/quake3/common/vfs.c +++ b/tools/quake3/common/vfs.c @@ -188,6 +188,7 @@ void vfsInitDirectory( const char *path ){ } if ( g_numDirs == VFS_MAXDIRS ) { + Sys_FPrintf( SYS_WRN, "WARNING: too many VFS directories, can't init %s\n", path ); return; } diff --git a/tools/quake3/common/vfs.h b/tools/quake3/common/vfs.h index 227a2f29..228f5d51 100644 --- a/tools/quake3/common/vfs.h +++ b/tools/quake3/common/vfs.h @@ -54,7 +54,9 @@ #include #endif -#define VFS_MAXDIRS 64 +// Multiple pakpaths with many pk3dirs can lead +// to high list of VFS directories +#define VFS_MAXDIRS 256 void vfsInitDirectory( const char *path ); void vfsShutdown(); -- 2.39.2