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:
parent
6602ffed84
commit
62657c2494
1 changed files with 2 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue