mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-05 15:43:08 +00:00
Resize downloaddir to fix -Wformat-truncation
This commit is contained in:
parent
dfd8a36f8f
commit
e78625455e
3 changed files with 4 additions and 3 deletions
|
|
@ -139,6 +139,7 @@ char srb2path[256] = ".";
|
||||||
boolean usehome = true;
|
boolean usehome = true;
|
||||||
const char *pandf = "%s" PATHSEP "%s";
|
const char *pandf = "%s" PATHSEP "%s";
|
||||||
static char addonsdir[MAX_WADPATH];
|
static char addonsdir[MAX_WADPATH];
|
||||||
|
char downloaddir[sizeof addonsdir + sizeof DOWNLOADDIR_PART] = "DOWNLOAD";
|
||||||
|
|
||||||
//
|
//
|
||||||
// EVENT HANDLING
|
// EVENT HANDLING
|
||||||
|
|
@ -1361,7 +1362,7 @@ void D_SRB2Main(void)
|
||||||
|
|
||||||
/* and downloads in a subdirectory */
|
/* and downloads in a subdirectory */
|
||||||
snprintf(downloaddir, sizeof downloaddir, "%s%s%s",
|
snprintf(downloaddir, sizeof downloaddir, "%s%s%s",
|
||||||
addonsdir, PATHSEP, "downloads");
|
addonsdir, PATHSEP, DOWNLOADDIR_PART);
|
||||||
|
|
||||||
// rand() needs seeded regardless of password
|
// rand() needs seeded regardless of password
|
||||||
srand((unsigned int)time(NULL));
|
srand((unsigned int)time(NULL));
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,6 @@ static filetran_t transfer[MAXNETNODES];
|
||||||
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
|
||||||
static tic_t lasttimeackpacketsent = 0;
|
static tic_t lasttimeackpacketsent = 0;
|
||||||
char downloaddir[512] = "DOWNLOAD";
|
|
||||||
|
|
||||||
// For resuming failed downloads
|
// For resuming failed downloads
|
||||||
typedef struct
|
typedef struct
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,8 @@ struct fileneeded_t
|
||||||
|
|
||||||
extern INT32 fileneedednum;
|
extern INT32 fileneedednum;
|
||||||
extern fileneeded_t fileneeded[MAX_WADFILES];
|
extern fileneeded_t fileneeded[MAX_WADFILES];
|
||||||
extern char downloaddir[512];
|
#define DOWNLOADDIR_PART "downloads"
|
||||||
|
extern char downloaddir[];
|
||||||
|
|
||||||
extern INT32 lastfilenum;
|
extern INT32 lastfilenum;
|
||||||
extern INT32 downloadcompletednum;
|
extern INT32 downloadcompletednum;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue