Fix xterm/screen/(any program using just :xxx form) compatibility

This commit is contained in:
Andrey A. Chernov 1996-06-17 19:23:38 +00:00
parent 20d1d1dc3f
commit 1694c5cb7a

View File

@ -323,7 +323,7 @@ main(argc, argv)
}
p = hp->h_name;
}
if (nflag && strcmp(p, "-") && inet_addr(p) == INADDR_NONE) {
if (nflag && *p && strcmp(p, "-") && inet_addr(p) == INADDR_NONE) {
hp = gethostbyname(p);
if (hp != NULL) {