fix format-truncation: need bigger string buffers
This commit is contained in:
1 parent
fb08950c19
commit
4695841b8d
4 files changed
+8
-5
No files matched your search
+1
-1
@@ -94,7 +94,7 @@ static filetran_t transfer[MAXNETNODES];
|
||||
// Receiver structure
|
||||
INT32 fileneedednum; // Number of files needed to join the server
|
||||
fileneeded_t fileneeded[MAX_WADFILES]; // List of needed files
|
||||
char downloaddir[256] = "DOWNLOAD";
|
||||
char downloaddir[512] = "DOWNLOAD";
|
||||
|
||||
#ifdef CLIENT_LOADINGSCREEN
|
||||
// for cl loading screen
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ typedef struct
|
||||
|
||||
extern INT32 fileneedednum;
|
||||
extern fileneeded_t fileneeded[MAX_WADFILES];
|
||||
extern char downloaddir[256];
|
||||
extern char downloaddir[512];
|
||||
|
||||
#ifdef CLIENT_LOADINGSCREEN
|
||||
extern INT32 lastfilenum;
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ typedef struct
|
||||
// DYNAMIC WAD LOADING
|
||||
// =========================================================================
|
||||
|
||||
#define MAX_WADPATH 128
|
||||
#define MAX_WADPATH 512
|
||||
#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)
|
||||
|
||||
|
||||
+5
-2
@@ -1440,6 +1440,7 @@ static void Y_CalculateCompetitionWinners(void)
|
||||
UINT32 maxrings[MAXPLAYERS];
|
||||
UINT32 monitors[MAXPLAYERS];
|
||||
UINT32 scores[MAXPLAYERS];
|
||||
char tempname[9];
|
||||
|
||||
memset(data.competition.points, 0, sizeof (data.competition.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.scores[data.competition.numplayers] = scores[winner];
|
||||
|
||||
snprintf(data.competition.name[data.competition.numplayers], 9, "%s", player_names[winner]);
|
||||
data.competition.name[data.competition.numplayers][8] = '\0';
|
||||
strncpy(tempname, player_names[winner], 8);
|
||||
tempname[8] = '\0';
|
||||
strncpy(data.competition.name[data.competition.numplayers], tempname, 9);
|
||||
|
||||
data.competition.color[data.competition.numplayers] = &players[winner].skincolor;
|
||||
data.competition.character[data.competition.numplayers] = &players[winner].skin;
|
||||
@@ -1904,4 +1906,5 @@ static void Y_UnloadData(void)
|
||||
//are not handled
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user