From a5780130e8bb9cbc054e63840ef94e6e5d21b3b1 Mon Sep 17 00:00:00 2001 From: havoc Date: Tue, 13 Jun 2006 16:25:55 +0000 Subject: [PATCH] made FromString reject empty strings git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6477 d7cf8633-e32d-0410-b094-e92efae38249 --- lhnet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.2