Merge 9037d239911413d64aee638e792bbd130c882def into c9104217968bebf95dd50e17e5596b3671efd608

This commit is contained in:
Rodrigo Laneth 2024-12-28 15:35:36 +01:00 committed by GitHub
commit 6dab0417ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

2
TCP.c
View File

@ -21,7 +21,7 @@ int open_tcp(char* ip, int port) {
memset(&serv_addr, 0, sizeof(serv_addr));
serv_addr.sin_family = AF_INET;
memcpy(server->h_addr, &serv_addr.sin_addr.s_addr, server->h_length);
memcpy(&serv_addr.sin_addr.s_addr, server->h_addr, server->h_length);
serv_addr.sin_port = htons(port);
if (connect(sockfd, (struct sockaddr*)&serv_addr, sizeof(serv_addr)) < 0) {