Skip to content

Commit

Permalink
addrlen must be 8
Browse files Browse the repository at this point in the history
  • Loading branch information
WinterMute authored and Extrems committed Feb 21, 2024
1 parent 5594682 commit ae64694
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions libogc/network_wii.c
Original file line number Diff line number Diff line change
Expand Up @@ -858,13 +858,14 @@ s32 net_connect(s32 s, struct sockaddr *addr, socklen_t addrlen)
memset(params, 0, sizeof(struct connect_params));
params->socket = s;
params->has_addr = 1;
memcpy(&params->addr, addr, addrlen);
memcpy(params->addr, addr, 8);

ret = _net_convert_error(IOS_Ioctl(net_ip_top_fd, IOCTL_SO_CONNECT, params, sizeof(struct connect_params), NULL, 0));

if (ret < 0)
debug_printf("SOConnect(%d, %p)=%d\n", s, addr, ret);
debug_printf("net_connect(%d, %p)=%d\n", s, addr, ret);

return ret;
return ret;
}

s32 net_write(s32 s, const void *data, s32 size)
Expand Down

0 comments on commit ae64694

Please sign in to comment.