Skip to content

Commit

Permalink
Host_Motd_f: Fixed viewing motd when motdfile is not specified
Browse files Browse the repository at this point in the history
  • Loading branch information
s1lentq committed Sep 20, 2023
1 parent 2ba27d4 commit 43df0ba
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions rehlds/engine/host_cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,13 @@ void Host_Motd_f(void)
Con_Printf("Unable to open %s (contains illegal characters)\n", pFileList);
return;
}

if (Q_strlen(pFileList) <= 0)
{
Con_Printf("Unable to open MOTD (motdfile not specified)\n");
return;
}

pFile = FS_Open(pFileList, "rb");
if (!pFile)
{
Expand Down

0 comments on commit 43df0ba

Please sign in to comment.