mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Resize menudemo_t filepath to fix -Wformat-truncation
This commit is contained in:
parent
e78625455e
commit
e7af4a5084
2 changed files with 4 additions and 2 deletions
|
|
@ -82,7 +82,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
|
||||||
|
|
|
||||||
|
|
@ -6621,7 +6621,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