From 99566f099149484c798a0032aa61649249af6b69 Mon Sep 17 00:00:00 2001 From: sezero Date: Tue, 11 Dec 2012 10:11:22 +0000 Subject: [PATCH] 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 --- Quake/pr_edict.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Quake/pr_edict.c b/Quake/pr_edict.c index 71866afd..2bbd6af3 100644 --- a/Quake/pr_edict.c +++ b/Quake/pr_edict.c @@ -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)