summaryrefslogtreecommitdiff
path: root/src/pkg/crypto
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2010-07-01 14:08:14 -0700
committerRob Pike <r@golang.org>2010-07-01 14:08:14 -0700
commitb3fb215bd4973f0a8b52d49bcb90f31ca64ae781 (patch)
tree5b188afe344ef0e4cb39832efc2d76613bc2e5e2 /src/pkg/crypto
parent32de5c228f33e6bcfef081d51da8263747a6c448 (diff)
downloadgolang-b3fb215bd4973f0a8b52d49bcb90f31ca64ae781.tar.gz
strings and bytes.Split: make count of 0 mean 0, not infinite.
Use a count of -1 for infinity. Ditto for Replace. R=rsc CC=golang-dev http://codereview.appspot.com/1704044 Committer: Rob Pike <r@golang.org>
Diffstat (limited to 'src/pkg/crypto')
-rw-r--r--src/pkg/crypto/x509/x509.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/crypto/x509/x509.go b/src/pkg/crypto/x509/x509.go
index 23b7d0b62..728116850 100644
--- a/src/pkg/crypto/x509/x509.go
+++ b/src/pkg/crypto/x509/x509.go
@@ -407,8 +407,8 @@ func matchHostnames(pattern, host string) bool {
return false
}
- patternParts := strings.Split(pattern, ".", 0)
- hostParts := strings.Split(host, ".", 0)
+ patternParts := strings.Split(pattern, ".", -1)
+ hostParts := strings.Split(host, ".", -1)
if len(patternParts) != len(hostParts) {
return false