aboutsummaryrefslogtreecommitdiffstats
path: root/code/qcommon
diff options
context:
space:
mode:
Diffstat (limited to 'code/qcommon')
-rw-r--r--code/qcommon/files.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/code/qcommon/files.c b/code/qcommon/files.c
index d20b3a1..2630a5c 100644
--- a/code/qcommon/files.c
+++ b/code/qcommon/files.c
@@ -2556,6 +2556,13 @@ FS_idPak
*/
qboolean FS_idPak( char *pak, char *base ) {
int i;
+ char pakbuf[MAX_QPATH], *pakptr;
+
+ // Chop off filename extension if necessary.
+ Com_sprintf(pakbuf, sizeof(pakbuf), "%s", pak);
+ pakptr = Q_strrchr(pakbuf, '.');
+ if(pakptr)
+ *pakptr = '\0';
for (i = 0; i < NUM_ID_PAKS; i++) {
if ( !FS_FilenameCompare(pak, va("%s/pak%d", base, i)) ) {