mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
dehacked.c: use actual size of descriptions buffers rather than MAXLINELEN, which is way too large
This commit is contained in:
parent
d11ba67288
commit
adb11eec1b
1 changed files with 2 additions and 2 deletions
|
@ -392,7 +392,7 @@ static void readPlayer(MYFILE *f, INT32 num)
|
|||
// It works down here, though.
|
||||
{
|
||||
INT32 numline = 0;
|
||||
for (i = 0; i < MAXLINELEN-1; i++)
|
||||
for (i = 0; (size_t)i < sizeof(description[num].notes)-1; i++)
|
||||
{
|
||||
if (numline < 20 && description[num].notes[i] == '\n')
|
||||
numline++;
|
||||
|
@ -1174,7 +1174,7 @@ static void readgametype(MYFILE *f, char *gtname)
|
|||
// It works down here, though.
|
||||
{
|
||||
INT32 numline = 0;
|
||||
for (i = 0; i < MAXLINELEN-1; i++)
|
||||
for (i = 0; (size_t)i < sizeof(gtdescription)-1; i++)
|
||||
{
|
||||
if (numline < 20 && gtdescription[i] == '\n')
|
||||
numline++;
|
||||
|
|
Loading…
Reference in a new issue