let replays with empty name save
this does not crash for us
This commit is contained in:
parent
6a4e8916e6
commit
9081c4d177
1 changed files with 0 additions and 15 deletions
15
src/g_demo.c
15
src/g_demo.c
|
|
@ -4433,21 +4433,6 @@ void G_SaveDemo(void)
|
||||||
demo_slug[128 - (writepoint - demoname) - 4] = 0;
|
demo_slug[128 - (writepoint - demoname) - 4] = 0;
|
||||||
sprintf(writepoint, "%s.lmp", demo_slug);
|
sprintf(writepoint, "%s.lmp", demo_slug);
|
||||||
}
|
}
|
||||||
else if (demo.titlename[0] == '\0')
|
|
||||||
{
|
|
||||||
// Slug is completely blank? Will crash if we attempt to save
|
|
||||||
// No bailout because empty seems like a good "no thanks" choice
|
|
||||||
if (demobuf.buffer)
|
|
||||||
Z_Free(demobuf.buffer);
|
|
||||||
demobuf.buffer = NULL;
|
|
||||||
demo.recording = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// If a title that is invalid is provided, the user clearly wanted
|
|
||||||
// to save. But we can't do so at that name, so we only apply the
|
|
||||||
// title INSIDE the file, not in the naked filesystem.
|
|
||||||
// (A hypothetical example is bamboozling bot behaviour causing
|
|
||||||
// a player to write "?????????".) ~toast 010524
|
|
||||||
}
|
}
|
||||||
|
|
||||||
length = *(UINT32 *)demoinfo_p;
|
length = *(UINT32 *)demoinfo_p;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue