mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
pr_edict.c (PR_ValueString, PR_UglyValueString, PR_GlobalString,
PR_GlobalStringNoContents): increase static line buffer size to 512, so that excessively long global strings don't cause a crash. git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@791 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
94c91375b0
commit
99566f0991
1 changed files with 4 additions and 4 deletions
|
@ -307,7 +307,7 @@ Returns a string describing *data in a type specific manner
|
|||
*/
|
||||
static const char *PR_ValueString (int type, eval_t *val)
|
||||
{
|
||||
static char line[256];
|
||||
static char line[512];
|
||||
ddef_t *def;
|
||||
dfunction_t *f;
|
||||
|
||||
|
@ -360,7 +360,7 @@ Easier to parse than PR_ValueString
|
|||
*/
|
||||
static const char *PR_UglyValueString (int type, eval_t *val)
|
||||
{
|
||||
static char line[256];
|
||||
static char line[512];
|
||||
ddef_t *def;
|
||||
dfunction_t *f;
|
||||
|
||||
|
@ -409,11 +409,11 @@ padded to 20 field width
|
|||
*/
|
||||
const char *PR_GlobalString (int ofs)
|
||||
{
|
||||
static char line[512];
|
||||
const char *s;
|
||||
int i;
|
||||
ddef_t *def;
|
||||
void *val;
|
||||
static char line[128];
|
||||
|
||||
val = (void *)&pr_globals[ofs];
|
||||
def = ED_GlobalAtOfs(ofs);
|
||||
|
@ -435,9 +435,9 @@ const char *PR_GlobalString (int ofs)
|
|||
|
||||
const char *PR_GlobalStringNoContents (int ofs)
|
||||
{
|
||||
static char line[512];
|
||||
int i;
|
||||
ddef_t *def;
|
||||
static char line[128];
|
||||
|
||||
def = ED_GlobalAtOfs(ofs);
|
||||
if (!def)
|
||||
|
|
Loading…
Reference in a new issue