From 039a5c0b71b22e1e99ac42c25b13f98f698163a2 Mon Sep 17 00:00:00 2001 From: Lephenixnoir Date: Tue, 31 Aug 2021 19:54:39 +0200 Subject: [PATCH] Allow longer file names (27 characters) --- cgdoom/cgdoom.c | 6 +++--- cgdoom/cgdoom.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cgdoom/cgdoom.c b/cgdoom/cgdoom.c index 4349566..cc74501 100644 --- a/cgdoom/cgdoom.c +++ b/cgdoom/cgdoom.c @@ -348,7 +348,7 @@ typedef struct /* Find WAD files in the filesystem. */ int FindWADs(WADFileInfo *files, int max) { - uint16_t path[16]; + uint16_t path[32]; Bfile_FileInfo info; int sd, rc, total=0; @@ -357,8 +357,8 @@ int FindWADs(WADFileInfo *files, int max) while(rc != -16 && total < max) { memcpy(files[total].path, u"\\\\fls0\\", 14); - memcpy(files[total].path+7, path, 16*2); - Bfile_NameToStr_ncpy(files[total].name, path, 16); + memcpy(files[total].path+7, path, 32*2); + Bfile_NameToStr_ncpy(files[total].name, path, 32); files[total].size = info.fsize; total++; diff --git a/cgdoom/cgdoom.h b/cgdoom/cgdoom.h index d3fcc2e..91d0602 100644 --- a/cgdoom/cgdoom.h +++ b/cgdoom/cgdoom.h @@ -14,8 +14,8 @@ extern uint16_t *VRAM; /* Description of a WAD file selectable by user. */ typedef struct { - char name[16]; - uint16_t path[23]; + char name[32]; + uint16_t path[7+32]; int size; } WADFileInfo;