mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-22 10:52:23 +00:00
fix warnings
This commit is contained in:
parent
019e52a4f4
commit
ebdd9c6257
2 changed files with 5 additions and 2 deletions
|
@ -3220,7 +3220,8 @@ void G_UpdateGametypeSelections(void)
|
|||
//
|
||||
void G_SetGametypeDescription(INT16 gtype, char *descriptiontext, UINT8 leftcolor, UINT8 rightcolor)
|
||||
{
|
||||
strncpy(gametypedesc[gtype].notes, descriptiontext, 441);
|
||||
if (descriptiontext != NULL)
|
||||
strncpy(gametypedesc[gtype].notes, descriptiontext, 441);
|
||||
gametypedesc[gtype].col[0] = leftcolor;
|
||||
gametypedesc[gtype].col[1] = rightcolor;
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "m_random.h"
|
||||
#include "s_sound.h"
|
||||
#include "g_game.h"
|
||||
#include "m_menu.h"
|
||||
#include "y_inter.h"
|
||||
#include "hu_stuff.h" // HU_AddChatText
|
||||
#include "console.h"
|
||||
|
@ -2737,7 +2738,8 @@ static int lib_gAddGametype(lua_State *L)
|
|||
// Add the new gametype
|
||||
newgtidx = G_AddGametype(newgtrules);
|
||||
G_AddGametypeTOL(newgtidx, newgttol);
|
||||
G_SetGametypeDescription(newgtidx, (char *)gtdescription, newgtleftcolor, newgtrightcolor);
|
||||
G_SetGametypeDescription(newgtidx, NULL, newgtleftcolor, newgtrightcolor);
|
||||
strncpy(gametypedesc[newgtidx].notes, gtdescription, 441);
|
||||
|
||||
// Not covered by G_AddGametype alone.
|
||||
if (newgtrankingstype == -1)
|
||||
|
|
Loading…
Reference in a new issue