Fixed a crash when not supplying a demoname upon recording.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5207 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Eukara 2018-01-25 20:43:00 +00:00
parent 912812083e
commit 0d82557c28

View file

@ -1540,10 +1540,16 @@ void CL_Record_f (void)
if (c == 2) //user supplied a name
{
fname = Cmd_Argv(1);
// See if the users supplied their own filename...
s = strrchr(fname, '.');
// They did.
if ( s != NULL ) {
if (!Q_strcasecmp(s, defaultext))
*s = 0; //hack away that extension that they added.
}
}
else
{ //automagically generate a name
if (cl.playerview[0].spectator)