mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
net: fix ParseIP
Fixes #1695. R=golang-dev, rsc CC=golang-dev, r https://golang.org/cl/4418042
This commit is contained in:
parent
24bb0340b6
commit
c09af6631f
2 changed files with 2 additions and 1 deletions
|
|
@ -436,7 +436,7 @@ func parseIPv6(s string) IP {
|
|||
}
|
||||
|
||||
// Otherwise must be followed by colon and more.
|
||||
if s[i] != ':' && i+1 == len(s) {
|
||||
if s[i] != ':' || i+1 == len(s) {
|
||||
return nil
|
||||
}
|
||||
i++
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue