fix bug in ipv6 parsing that prevented parsing a lone "::"

This commit is contained in:
Rich Felker 2011-04-25 17:49:21 -04:00
parent 34d81974d3
commit 3486365e95
1 changed files with 1 additions and 4 deletions

View File

@ -36,10 +36,7 @@ int inet_pton(int af, const char *s, void *a0)
return -1;
}
if (s[0]==':' && s[1]==':') {
s+=2;
brk=0;
}
if (s[0]==':' && s[1]==':') s++;
for (i=0; ; i++, s+=j+1) {
if (s[0]==':' && brk<0) {