From 62657c249424a8f8697baecb7875ac37df16a6af Mon Sep 17 00:00:00 2001 From: Molgrum Date: Sun, 8 Jun 2008 20:41:22 +0000 Subject: [PATCH] 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 --- engine/common/net_wins.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/engine/common/net_wins.c b/engine/common/net_wins.c index 96da6e635..b01f576c3 100644 --- a/engine/common/net_wins.c +++ b/engine/common/net_wins.c @@ -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)