提交 3486365e 编写于 作者: R Rich Felker

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

上级 34d81974
...@@ -36,10 +36,7 @@ int inet_pton(int af, const char *s, void *a0) ...@@ -36,10 +36,7 @@ int inet_pton(int af, const char *s, void *a0)
return -1; return -1;
} }
if (s[0]==':' && s[1]==':') { if (s[0]==':' && s[1]==':') s++;
s+=2;
brk=0;
}
for (i=0; ; i++, s+=j+1) { for (i=0; ; i++, s+=j+1) {
if (s[0]==':' && brk<0) { if (s[0]==':' && brk<0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册