From: divverent Date: Wed, 4 Feb 2015 12:24:09 +0000 (+0000) Subject: Fix check/write order in LHNETADDRESS_ToString. X-Git-Tag: xonotic-v0.8.1~29^2~17 X-Git-Url: https://git.xonotic.org/?a=commitdiff_plain;h=80f2ffd875db95ac7cd03bec55a55690c8dbbf49;hp=9d4b7b3fdf49dd07c2dc95e273db3a2544c555fa;p=xonotic%2Fdarkplaces.git Fix check/write order in LHNETADDRESS_ToString. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12143 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/lhnet.c b/lhnet.c index e3bc6b71..22982571 100644 --- a/lhnet.c +++ b/lhnet.c @@ -535,9 +535,9 @@ int LHNETADDRESS_ToString(const lhnetaddress_t *vaddress, char *string, int stri { lhnetaddressnative_t *address = (lhnetaddressnative_t *)vaddress; const unsigned char *a; - *string = 0; if (!address || !string || stringbuffersize < 1) return 0; + *string = 0; switch(address->addresstype) { default: