- 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
|
@ -162,7 +162,7 @@ void UI_LoadBestScores(const char *map, int game) {
|
|||
}
|
||||
UI_SetBestScores(&newInfo, qfalse);
|
||||
|
||||
Com_sprintf(fileName, MAX_QPATH, "demos/%s_%d.dm_%d", map, game, (int)trap_Cvar_VariableValue("protocol"));
|
||||
Com_sprintf(fileName, MAX_QPATH, "demos/%s_%d.%s%d", map, game, DEMOEXT, (int)trap_Cvar_VariableValue("protocol"));
|
||||
uiInfo.demoAvailable = qfalse;
|
||||
if (trap_FS_FOpenFile(fileName, &f, FS_READ) >= 0) {
|
||||
uiInfo.demoAvailable = qtrue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue