Commit 6de0ebc0 authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Fix xp_inet_pton: was just writing 0x02 (address family)to 'dst', always

Tried using this function in a new project and didn't work. My guess: it wasn't tested. <looks at Deuce>
parent b1449b27
Pipeline #3018 passed with stage
in 9 minutes and 24 seconds
......@@ -755,10 +755,10 @@ DLLEXPORT int xp_inet_pton(int af, const char *src, void *dst)
switch(af) {
case AF_INET:
memcpy(dst, &(((struct sockaddr_in *)cur)->sin_addr), sizeof(((struct sockaddr_in *)cur)->sin_addr));
memcpy(dst, &(((struct sockaddr_in *)cur->ai_addr)->sin_addr), sizeof(((struct sockaddr_in *)cur->ai_addr)->sin_addr));
case AF_INET6:
memcpy(dst, &(((struct sockaddr_in6 *)cur)->sin6_addr), sizeof(((struct sockaddr_in6 *)cur)->sin6_addr));
memcpy(dst, &(((struct sockaddr_in6 *)cur->ai_addr)->sin6_addr), sizeof(((struct sockaddr_in6 *)cur->ai_addr)->sin6_addr));
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment