Reset the buffers before strlen is used.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3004 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Molgrum 2008-06-08 20:41:22 +00:00
parent 6602ffed84
commit 62657c2494

View file

@ -337,6 +337,7 @@ char *NET_AdrToString (char *s, int len, netadr_t a)
#ifdef IPPROTO_IPV6
case NA_BROADCAST_IP6:
case NA_IPV6:
*s = 0;
doneblank = false;
p = s;
snprintf (s, len-strlen(s), "[");
@ -427,6 +428,7 @@ char *NET_BaseAdrToString (char *s, int len, netadr_t a)
#ifdef IPPROTO_IPV6
case NA_BROADCAST_IP6:
case NA_IPV6:
*s = 0;
doneblank = false;
p = s;
for (i = 0; i < 16; i+=2)