mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-21 11:21:52 +00:00
menu: Fix default NULL
This commit is contained in:
parent
28aeb68826
commit
e7dc4f3b2c
3 changed files with 12 additions and 12 deletions
|
@ -121,7 +121,7 @@ M_ForceMenuOff(void)
|
|||
Cvar_Set("paused", "0");
|
||||
}
|
||||
|
||||
void
|
||||
void
|
||||
M_PopMenu(void)
|
||||
{
|
||||
S_StartLocalSound(menu_out_sound);
|
||||
|
@ -726,7 +726,7 @@ InitMainMenu(void)
|
|||
static void
|
||||
M_Main_Draw(void)
|
||||
{
|
||||
menucommon_s * item = 0;
|
||||
menucommon_s * item = NULL;
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
|
||||
|
@ -752,7 +752,7 @@ M_Main_Key(int key)
|
|||
void
|
||||
M_Menu_Main_f(void)
|
||||
{
|
||||
menucommon_s * item = 0;
|
||||
menucommon_s * item = NULL;
|
||||
|
||||
InitMainMenu();
|
||||
|
||||
|
@ -5502,7 +5502,7 @@ static qboolean
|
|||
PlayerDirectoryList(void)
|
||||
{
|
||||
char* findname = "players/*";
|
||||
char** list = 0;
|
||||
char** list = NULL;
|
||||
int num = 0;
|
||||
|
||||
// get a list of "players" subdirectories
|
||||
|
@ -5559,8 +5559,8 @@ static qboolean
|
|||
PlayerModelList(void)
|
||||
{
|
||||
char findname[MAX_QPATH];
|
||||
char** list = 0;
|
||||
char** data = 0;
|
||||
char** list = NULL;
|
||||
char** data = NULL;
|
||||
int num = 0;
|
||||
int mdl = 0;
|
||||
qboolean result = true;
|
||||
|
@ -5588,7 +5588,7 @@ PlayerModelList(void)
|
|||
strcat(findname, "/*.pcx");
|
||||
|
||||
// get a list of pcx files
|
||||
if ((list = FS_ListFiles2(findname, &num, 0, 0)) == 0)
|
||||
if ((list = FS_ListFiles2(findname, &num, 0, 0)) == NULL)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -912,7 +912,7 @@ Cmd_CompleteMapCommand(char *partial)
|
|||
char *pmatch[1024];
|
||||
qboolean partialFillContinue = true;
|
||||
|
||||
if ((mapNames = FS_ListFiles2("maps/*.bsp", &nMaps, 0, 0)) != 0)
|
||||
if ((mapNames = FS_ListFiles2("maps/*.bsp", &nMaps, 0, 0)) != NULL)
|
||||
{
|
||||
len = strlen(partial);
|
||||
nbMatches = 0;
|
||||
|
|
|
@ -321,7 +321,7 @@ void SV_ListMaps_f(void)
|
|||
|
||||
Com_Printf("\n");
|
||||
|
||||
if ((userMapNames = FS_ListFiles2("maps/*.bsp", &nUserMaps, 0, 0)) != 0)
|
||||
if ((userMapNames = FS_ListFiles2("maps/*.bsp", &nUserMaps, 0, 0)) != NULL)
|
||||
{
|
||||
for (i = 0; i < nUserMaps - 1; i++)
|
||||
{
|
||||
|
@ -371,7 +371,7 @@ SV_Kick_f(void)
|
|||
SV_BroadcastPrintf(PRINT_HIGH, "%s was kicked\n", sv_client->name);
|
||||
}
|
||||
|
||||
/* print directly, because the dropped client
|
||||
/* print directly, because the dropped client
|
||||
won't get the SV_BroadcastPrintf message */
|
||||
SV_ClientPrintf(sv_client, PRINT_HIGH, "You were kicked from the game\n");
|
||||
SV_DropClient(sv_client);
|
||||
|
@ -564,8 +564,8 @@ SV_ServerRecord_f(void)
|
|||
return;
|
||||
}
|
||||
|
||||
if (strstr(Cmd_Argv(1), "..") ||
|
||||
strstr(Cmd_Argv(1), "/") ||
|
||||
if (strstr(Cmd_Argv(1), "..") ||
|
||||
strstr(Cmd_Argv(1), "/") ||
|
||||
strstr(Cmd_Argv(1), "\\"))
|
||||
{
|
||||
Com_Printf("Illegal filename.\n");
|
||||
|
|
Loading…
Reference in a new issue