mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'fix-format-truncation'
This commit is contained in:
commit
e1b7fd79ee
5 changed files with 8 additions and 5 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";
|
||||||
char addonsdir[MAX_WADPATH];
|
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;
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ typedef enum {
|
||||||
} menudemotype_e;
|
} menudemotype_e;
|
||||||
|
|
||||||
struct menudemo_t {
|
struct menudemo_t {
|
||||||
char filepath[256];
|
char filepath[1023 + 256]; // see M_PrepReplayList and sizeof menupath
|
||||||
menudemotype_e type;
|
menudemotype_e type;
|
||||||
|
|
||||||
char title[65]; // Null-terminated for string prints
|
char title[65]; // Null-terminated for string prints
|
||||||
|
|
|
||||||
|
|
@ -6636,7 +6636,9 @@ void M_PrepReplayList(void)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
extrasmenu.demolist[i].type = MD_NOTLOADED;
|
extrasmenu.demolist[i].type = MD_NOTLOADED;
|
||||||
snprintf(extrasmenu.demolist[i].filepath, 255, "%s%s", menupath, dirmenu[i] + DIR_STRING);
|
snprintf(extrasmenu.demolist[i].filepath, sizeof extrasmenu.demolist[i].filepath,
|
||||||
|
// 255 = UINT8 limit. dirmenu entries are restricted to this length (see DIR_LEN).
|
||||||
|
"%s%.255s", menupath, dirmenu[i] + DIR_STRING);
|
||||||
sprintf(extrasmenu.demolist[i].title, ".....");
|
sprintf(extrasmenu.demolist[i].title, ".....");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue