Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/sezero/quakespasm
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-drexler committed Dec 25, 2023
2 parents faad496 + b3b4203 commit f46cac3
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Quake/pr_edict.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,7 @@ padded to 20 field width
const char *PR_GlobalString (int ofs)
{
static char line[512];
static const int lastchari = Q_COUNTOF(line) - 2;
const char *s;
int i;
ddef_t *def;
Expand All @@ -619,14 +620,19 @@ const char *PR_GlobalString (int ofs)
i = strlen(line);
for ( ; i < 20; i++)
strcat (line, " ");
strcat (line, " ");

if (i < lastchari)
strcat (line, " ");
else
line[lastchari] = ' ';

return line;
}

const char *PR_GlobalStringNoContents (int ofs)
{
static char line[512];
static const int lastchari = Q_COUNTOF(line) - 2;
int i;
ddef_t *def;

Expand All @@ -639,7 +645,11 @@ const char *PR_GlobalStringNoContents (int ofs)
i = strlen(line);
for ( ; i < 20; i++)
strcat (line, " ");
strcat (line, " ");

if (i < lastchari)
strcat (line, " ");
else
line[lastchari] = ' ';

return line;
}
Expand Down

0 comments on commit f46cac3

Please sign in to comment.