]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
made FromString reject empty strings
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 13 Jun 2006 16:25:55 +0000 (16:25 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 13 Jun 2006 16:25:55 +0000 (16:25 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6477 d7cf8633-e32d-0410-b094-e92efae38249

lhnet.c

diff --git a/lhnet.c b/lhnet.c
index 0b63b560758e1bce88607acd01fab3cfefbd09ae..67ccc9a727ac927746b6f0f88ebcbd8462327da3 100644 (file)
--- 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;