mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-14 22:00:50 +00:00
fix format-truncation: need bigger string buffers
This commit is contained in:
parent
fb08950c19
commit
4695841b8d
4 changed files with 8 additions and 5 deletions
|
@ -94,7 +94,7 @@ static filetran_t transfer[MAXNETNODES];
|
||||||
// Receiver structure
|
// Receiver structure
|
||||||
INT32 fileneedednum; // Number of files needed to join the server
|
INT32 fileneedednum; // Number of files needed to join the server
|
||||||
fileneeded_t fileneeded[MAX_WADFILES]; // List of needed files
|
fileneeded_t fileneeded[MAX_WADFILES]; // List of needed files
|
||||||
char downloaddir[256] = "DOWNLOAD";
|
char downloaddir[512] = "DOWNLOAD";
|
||||||
|
|
||||||
#ifdef CLIENT_LOADINGSCREEN
|
#ifdef CLIENT_LOADINGSCREEN
|
||||||
// for cl loading screen
|
// for cl loading screen
|
||||||
|
|
|
@ -48,7 +48,7 @@ typedef struct
|
||||||
|
|
||||||
extern INT32 fileneedednum;
|
extern INT32 fileneedednum;
|
||||||
extern fileneeded_t fileneeded[MAX_WADFILES];
|
extern fileneeded_t fileneeded[MAX_WADFILES];
|
||||||
extern char downloaddir[256];
|
extern char downloaddir[512];
|
||||||
|
|
||||||
#ifdef CLIENT_LOADINGSCREEN
|
#ifdef CLIENT_LOADINGSCREEN
|
||||||
extern INT32 lastfilenum;
|
extern INT32 lastfilenum;
|
||||||
|
|
|
@ -48,7 +48,7 @@ typedef struct
|
||||||
// DYNAMIC WAD LOADING
|
// DYNAMIC WAD LOADING
|
||||||
// =========================================================================
|
// =========================================================================
|
||||||
|
|
||||||
#define MAX_WADPATH 128
|
#define MAX_WADPATH 512
|
||||||
#define MAX_WADFILES 48 // maximum of wad files used at the same time
|
#define MAX_WADFILES 48 // maximum of wad files used at the same time
|
||||||
// (there is a max of simultaneous open files anyway, and this should be plenty)
|
// (there is a max of simultaneous open files anyway, and this should be plenty)
|
||||||
|
|
||||||
|
|
|
@ -1440,6 +1440,7 @@ static void Y_CalculateCompetitionWinners(void)
|
||||||
UINT32 maxrings[MAXPLAYERS];
|
UINT32 maxrings[MAXPLAYERS];
|
||||||
UINT32 monitors[MAXPLAYERS];
|
UINT32 monitors[MAXPLAYERS];
|
||||||
UINT32 scores[MAXPLAYERS];
|
UINT32 scores[MAXPLAYERS];
|
||||||
|
char tempname[9];
|
||||||
|
|
||||||
memset(data.competition.points, 0, sizeof (data.competition.points));
|
memset(data.competition.points, 0, sizeof (data.competition.points));
|
||||||
memset(points, 0, sizeof (points));
|
memset(points, 0, sizeof (points));
|
||||||
|
@ -1531,8 +1532,9 @@ static void Y_CalculateCompetitionWinners(void)
|
||||||
data.competition.monitors[data.competition.numplayers] = monitors[winner];
|
data.competition.monitors[data.competition.numplayers] = monitors[winner];
|
||||||
data.competition.scores[data.competition.numplayers] = scores[winner];
|
data.competition.scores[data.competition.numplayers] = scores[winner];
|
||||||
|
|
||||||
snprintf(data.competition.name[data.competition.numplayers], 9, "%s", player_names[winner]);
|
strncpy(tempname, player_names[winner], 8);
|
||||||
data.competition.name[data.competition.numplayers][8] = '\0';
|
tempname[8] = '\0';
|
||||||
|
strncpy(data.competition.name[data.competition.numplayers], tempname, 9);
|
||||||
|
|
||||||
data.competition.color[data.competition.numplayers] = &players[winner].skincolor;
|
data.competition.color[data.competition.numplayers] = &players[winner].skincolor;
|
||||||
data.competition.character[data.competition.numplayers] = &players[winner].skin;
|
data.competition.character[data.competition.numplayers] = &players[winner].skin;
|
||||||
|
@ -1904,4 +1906,5 @@ static void Y_UnloadData(void)
|
||||||
//are not handled
|
//are not handled
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue