forked from facebookarchive/RakNet
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from jarikomppa/master
Raknet - pull request #4
- Loading branch information
Showing
2 changed files
with
3 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ void DomainNameToIP_Berkley_IPV4And6( const char *domainName, char ip[65] ) | |
hints.ai_socktype = SOCK_DGRAM; | ||
|
||
if ((status = getaddrinfo(domainName, NULL, &hints, &res)) != 0) { | ||
memset(ip, 0, sizeof(ip)); | ||
memset(ip, 0, 65); // sizeof(ip) returns pointer size, not array size | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
Luke1410
Author
Member
|
||
return; | ||
} | ||
|
||
|
this doesn't make sense. should be
ip[0] = '\0';
there is similar code in some other RakNetSocket2_xxx file that does
65*sizeof(char)