@- Fixed long2ip() to return the correct IP address. (Evan)

# ip2long() is still broken.
This commit is contained in:
Evan Klinger 2000-04-18 22:50:24 +00:00
parent d191777b3f
commit d6c66f3b7c

View File

@ -760,8 +760,8 @@ PHP_FUNCTION(long2ip)
WRONG_PARAM_COUNT;
}
convert_to_long_ex(num);
myaddr.s_addr = (*num)->value.lval;
convert_to_string_ex(num);
myaddr.s_addr = strtoul((*num)->value.str.val,NULL,10);
RETURN_STRING (inet_ntoa(myaddr), 1);
}