mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
menus.c: prevent using a null pointer as arg to "%s" format for sprintf().
DONT_BUILD. git-svn-id: https://svn.eduke32.com/eduke32@4712 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
ce6176757b
commit
f24ccdecc0
2 changed files with 5 additions and 3 deletions
|
@ -101,7 +101,6 @@ int32_t menutext_(int32_t x, int32_t y, int32_t s, int32_t p, char *t, int32_t b
|
|||
|
||||
#pragma pack(push,1)
|
||||
static savehead_t savehead;
|
||||
//static struct savehead_ savehead;
|
||||
#pragma pack(pop)
|
||||
|
||||
static void M_DrawBackground(const vec2_t origin)
|
||||
|
@ -1924,7 +1923,11 @@ static void M_PreMenuDraw(MenuID_t cm, MenuGroup_t *group, MenuEntry_t *entry, c
|
|||
mgametextcenter(origin.x, origin.y + (156<<16), tempbuf);
|
||||
}
|
||||
|
||||
Bsprintf(tempbuf,"%s / %s",MapInfo[(savehead.volnum*MAXLEVELS) + savehead.levnum].name, SkillNames[savehead.skill-1]);
|
||||
{
|
||||
const char *name = MapInfo[(savehead.volnum*MAXLEVELS) + savehead.levnum].name;
|
||||
Bsprintf(tempbuf, "%s / %s", name ? name : "^10unnamed^0", SkillNames[savehead.skill-1]);
|
||||
}
|
||||
|
||||
mgametextcenter(origin.x, origin.y + (168<<16), tempbuf);
|
||||
if (savehead.volnum == 0 && savehead.levnum == 7)
|
||||
mgametextcenter(origin.x, origin.y + (180<<16), savehead.boardfn);
|
||||
|
|
|
@ -66,7 +66,6 @@ void sv_freemem();
|
|||
int32_t G_SavePlayer(int32_t spot);
|
||||
int32_t G_LoadPlayer(int32_t spot);
|
||||
int32_t G_LoadSaveHeaderNew(int32_t spot, savehead_t *saveh);
|
||||
//int32_t G_LoadSaveHeader(char spot,struct savehead_ *saveh);
|
||||
void ReadSaveGameHeaders(void);
|
||||
void G_SavePlayerMaybeMulti(int32_t slot);
|
||||
void G_LoadPlayerMaybeMulti(int32_t slot);
|
||||
|
|
Loading…
Reference in a new issue