mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-26 13:50:53 +00:00
Increase QEx strings limit, for mods that use fancy writebyte hacks.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6170 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
bc2c6efa08
commit
43565e4363
1 changed files with 11 additions and 8 deletions
|
@ -4107,18 +4107,21 @@ static void CLQEX_ParseServerVars(void)
|
|||
static char *CLQEX_ReadStrings(void)
|
||||
{
|
||||
unsigned short count = MSG_ReadShort(), a;
|
||||
const char *arg[8];
|
||||
const char *arg[256];
|
||||
static char formatted[8192];
|
||||
if (count > countof(arg))
|
||||
Host_EndGame ("CLQEX_ReadStrings: too many strings (%u>%u)", count, (unsigned)countof(arg));
|
||||
for (a = 0; a < count; a++)
|
||||
char inputs[65536];
|
||||
size_t ofs = 0;
|
||||
for (a = 0; a < count && a < countof(arg); )
|
||||
{
|
||||
char *s = alloca(8192);
|
||||
arg[a] = s;
|
||||
MSG_ReadStringBuffer(s, 8192);
|
||||
arg[a++] = MSG_ReadStringBuffer(inputs+ofs, sizeof(inputs)-1);
|
||||
ofs += strlen(inputs+ofs)+1;
|
||||
if (ofs >= sizeof(inputs))
|
||||
break;
|
||||
}
|
||||
for (; a < count; a++)
|
||||
MSG_ReadString(); //don't lose space, though we can't buffer it.
|
||||
|
||||
TL_Reformat(formatted, sizeof(formatted), count, arg);
|
||||
TL_Reformat(formatted, sizeof(formatted), a, arg);
|
||||
return formatted;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue