mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
info.c:
support unlimited info strings when maxsize is 0 sv_main.c: make localinfo unlimited
This commit is contained in:
parent
ac93a620d7
commit
c443e2c024
2 changed files with 3 additions and 2 deletions
|
@ -120,7 +120,8 @@ Info_SetValueForStarKey (info_t *info, const char *key, const char *value, int f
|
||||||
cursize -= strlen (k->key) + 1;
|
cursize -= strlen (k->key) + 1;
|
||||||
cursize -= strlen (k->value) + 1;
|
cursize -= strlen (k->value) + 1;
|
||||||
}
|
}
|
||||||
if (cursize + strlen (key) + 1 + strlen (value) + 1 > info->maxsize) {
|
if (info->maxsize &&
|
||||||
|
cursize + strlen (key) + 1 + strlen (value) + 1 > info->maxsize) {
|
||||||
Sys_Printf ("Info string length exceeded\n");
|
Sys_Printf ("Info string length exceeded\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2362,7 +2362,7 @@ SV_Init (void)
|
||||||
Sys_Init ();
|
Sys_Init ();
|
||||||
|
|
||||||
svs.info = Info_ParseString ("", MAX_SERVERINFO_STRING);
|
svs.info = Info_ParseString ("", MAX_SERVERINFO_STRING);
|
||||||
localinfo = Info_ParseString ("", MAX_LOCALINFO_STRING);
|
localinfo = Info_ParseString ("", 0); // unlimited
|
||||||
|
|
||||||
Cbuf_Init ();
|
Cbuf_Init ();
|
||||||
Cmd_Init ();
|
Cmd_Init ();
|
||||||
|
|
Loading…
Reference in a new issue