- Fix potential out-of-bounds read in files.c, fix by using new FS_IsExt
- Add capability to load demos with com_protocol suffix, partially applied patches from Simon McVittie - Fix demo loading if protocol number has more digits than 2 - Minor refactoring, replace all occurances of suffix "dm_" with global macro DEMOEXT
This commit is contained in:
parent
fef4d12d68
commit
c0cca7a0a8
6 changed files with 125 additions and 48 deletions
|
@ -223,7 +223,7 @@ static void Demos_MenuInit( void ) {
|
|||
s_demos.list.generic.y = 130;
|
||||
s_demos.list.width = 16;
|
||||
s_demos.list.height = 14;
|
||||
Com_sprintf(extension, sizeof(extension), "dm_%d", (int)trap_Cvar_VariableValue( "protocol" ) );
|
||||
Com_sprintf(extension, sizeof(extension), ".%s%d", DEMOEXT, (int) trap_Cvar_VariableValue("protocol"));
|
||||
s_demos.list.numitems = trap_FS_GetFileList( "demos", extension, s_demos.names, NAMEBUFSIZE );
|
||||
s_demos.list.itemnames = (const char **)s_demos.demolist;
|
||||
s_demos.list.columns = 3;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue