1
0
Fork 0
forked from fte/fteqw

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,9 +1540,15 @@ 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, '.');
if (!Q_strcasecmp(s, defaultext))
*s = 0; //hack away that extension that they added.
// They did.
if ( s != NULL ) {
if (!Q_strcasecmp(s, defaultext))
*s = 0; //hack away that extension that they added.
}
}
else
{ //automagically generate a name