- 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
|
@ -2877,11 +2877,11 @@ static void UI_LoadDemos( void ) {
|
|||
char *demoname;
|
||||
int i, len;
|
||||
|
||||
Com_sprintf(demoExt, sizeof(demoExt), "dm_%d", (int)trap_Cvar_VariableValue("protocol"));
|
||||
Com_sprintf(demoExt, sizeof(demoExt), "%s%d", DEMOEXT, (int)trap_Cvar_VariableValue("protocol"));
|
||||
|
||||
uiInfo.demoCount = trap_FS_GetFileList( "demos", demoExt, demolist, 4096 );
|
||||
|
||||
Com_sprintf(demoExt, sizeof(demoExt), ".dm_%d", (int)trap_Cvar_VariableValue("protocol"));
|
||||
Com_sprintf(demoExt, sizeof(demoExt), ".%s%d", DEMOEXT, (int)trap_Cvar_VariableValue("protocol"));
|
||||
|
||||
if (uiInfo.demoCount) {
|
||||
if (uiInfo.demoCount > MAX_DEMOS) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue