From: havoc Date: Tue, 13 Jun 2006 16:25:55 +0000 (+0000) Subject: made FromString reject empty strings X-Git-Tag: xonotic-v0.1.0preview~3901 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a5780130e8bb9cbc054e63840ef94e6e5d21b3b1;p=xonotic%2Fdarkplaces.git made FromString reject empty strings git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6477 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/lhnet.c b/lhnet.c index 0b63b560..67ccc9a7 100644 --- a/lhnet.c +++ b/lhnet.c @@ -104,7 +104,7 @@ int LHNETADDRESS_FromString(lhnetaddress_t *address, const char *string, int def struct hostent *hostentry; const char *colon; char name[128]; - if (!address || !string) + if (!address || !string || !*string) return 0; memset(address, 0, sizeof(*address)); address->addresstype = LHNETADDRESSTYPE_NONE;