mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-26 22:01:50 +00:00
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:
parent
912812083e
commit
0d82557c28
1 changed files with 8 additions and 2 deletions
|
@ -1540,10 +1540,16 @@ void CL_Record_f (void)
|
||||||
if (c == 2) //user supplied a name
|
if (c == 2) //user supplied a name
|
||||||
{
|
{
|
||||||
fname = Cmd_Argv(1);
|
fname = Cmd_Argv(1);
|
||||||
|
|
||||||
|
// See if the users supplied their own filename...
|
||||||
s = strrchr(fname, '.');
|
s = strrchr(fname, '.');
|
||||||
|
|
||||||
|
// They did.
|
||||||
|
if ( s != NULL ) {
|
||||||
if (!Q_strcasecmp(s, defaultext))
|
if (!Q_strcasecmp(s, defaultext))
|
||||||
*s = 0; //hack away that extension that they added.
|
*s = 0; //hack away that extension that they added.
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{ //automagically generate a name
|
{ //automagically generate a name
|
||||||
if (cl.playerview[0].spectator)
|
if (cl.playerview[0].spectator)
|
||||||
|
|
Loading…
Reference in a new issue