support unlimited info strings when maxsize is 0
sv_main.c:
	make localinfo unlimited
This commit is contained in:
Bill Currie 2001-11-05 02:08:20 +00:00
parent ac93a620d7
commit c443e2c024
2 changed files with 3 additions and 2 deletions

View file

@ -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;
} }

View file

@ -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 ();