Revert "Ensure NULL terminator for VS2005 and below"
This reverts commit 1f779dec2a. We needed '\0', not '0'.
pull/326/head
parent
1f779dec2a
commit
e227ddd09a
|
|
@ -81,9 +81,9 @@ int inet_pton(int af, const char *src, void *dst)
|
||||||
#else
|
#else
|
||||||
char temp[MAX_ADDRSTRLEN];
|
char temp[MAX_ADDRSTRLEN];
|
||||||
strncpy(temp, src, sizeof(temp));
|
strncpy(temp, src, sizeof(temp));
|
||||||
temp[MAX_ADDRSTRLEN-1] = '0';
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
int size = sizeof(ss);
|
int size = sizeof(ss);
|
||||||
if (WSAStringToAddress(temp, af, NULL, (struct sockaddr *)&ss, &size) == 0) {
|
if (WSAStringToAddress(temp, af, NULL, (struct sockaddr *)&ss, &size) == 0) {
|
||||||
switch (af) {
|
switch (af) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue