mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-22 03:41:19 +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");
|
Cvar_Set("paused", "0");
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
M_PopMenu(void)
|
M_PopMenu(void)
|
||||||
{
|
{
|
||||||
S_StartLocalSound(menu_out_sound);
|
S_StartLocalSound(menu_out_sound);
|
||||||
|
@ -726,7 +726,7 @@ InitMainMenu(void)
|
||||||
static void
|
static void
|
||||||
M_Main_Draw(void)
|
M_Main_Draw(void)
|
||||||
{
|
{
|
||||||
menucommon_s * item = 0;
|
menucommon_s * item = NULL;
|
||||||
int x = 0;
|
int x = 0;
|
||||||
int y = 0;
|
int y = 0;
|
||||||
|
|
||||||
|
@ -752,7 +752,7 @@ M_Main_Key(int key)
|
||||||
void
|
void
|
||||||
M_Menu_Main_f(void)
|
M_Menu_Main_f(void)
|
||||||
{
|
{
|
||||||
menucommon_s * item = 0;
|
menucommon_s * item = NULL;
|
||||||
|
|
||||||
InitMainMenu();
|
InitMainMenu();
|
||||||
|
|
||||||
|
@ -5502,7 +5502,7 @@ static qboolean
|
||||||
PlayerDirectoryList(void)
|
PlayerDirectoryList(void)
|
||||||
{
|
{
|
||||||
char* findname = "players/*";
|
char* findname = "players/*";
|
||||||
char** list = 0;
|
char** list = NULL;
|
||||||
int num = 0;
|
int num = 0;
|
||||||
|
|
||||||
// get a list of "players" subdirectories
|
// get a list of "players" subdirectories
|
||||||
|
@ -5559,8 +5559,8 @@ static qboolean
|
||||||
PlayerModelList(void)
|
PlayerModelList(void)
|
||||||
{
|
{
|
||||||
char findname[MAX_QPATH];
|
char findname[MAX_QPATH];
|
||||||
char** list = 0;
|
char** list = NULL;
|
||||||
char** data = 0;
|
char** data = NULL;
|
||||||
int num = 0;
|
int num = 0;
|
||||||
int mdl = 0;
|
int mdl = 0;
|
||||||
qboolean result = true;
|
qboolean result = true;
|
||||||
|
@ -5588,7 +5588,7 @@ PlayerModelList(void)
|
||||||
strcat(findname, "/*.pcx");
|
strcat(findname, "/*.pcx");
|
||||||
|
|
||||||
// get a list of pcx files
|
// 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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -912,7 +912,7 @@ Cmd_CompleteMapCommand(char *partial)
|
||||||
char *pmatch[1024];
|
char *pmatch[1024];
|
||||||
qboolean partialFillContinue = true;
|
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);
|
len = strlen(partial);
|
||||||
nbMatches = 0;
|
nbMatches = 0;
|
||||||
|
|
|
@ -321,7 +321,7 @@ void SV_ListMaps_f(void)
|
||||||
|
|
||||||
Com_Printf("\n");
|
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++)
|
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);
|
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 */
|
won't get the SV_BroadcastPrintf message */
|
||||||
SV_ClientPrintf(sv_client, PRINT_HIGH, "You were kicked from the game\n");
|
SV_ClientPrintf(sv_client, PRINT_HIGH, "You were kicked from the game\n");
|
||||||
SV_DropClient(sv_client);
|
SV_DropClient(sv_client);
|
||||||
|
@ -564,8 +564,8 @@ SV_ServerRecord_f(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strstr(Cmd_Argv(1), "..") ||
|
if (strstr(Cmd_Argv(1), "..") ||
|
||||||
strstr(Cmd_Argv(1), "/") ||
|
strstr(Cmd_Argv(1), "/") ||
|
||||||
strstr(Cmd_Argv(1), "\\"))
|
strstr(Cmd_Argv(1), "\\"))
|
||||||
{
|
{
|
||||||
Com_Printf("Illegal filename.\n");
|
Com_Printf("Illegal filename.\n");
|
||||||
|
|
Loading…
Reference in a new issue