diff options
| author | Rob Pike <r@golang.org> | 2010-07-01 14:08:14 -0700 |
|---|---|---|
| committer | Rob Pike <r@golang.org> | 2010-07-01 14:08:14 -0700 |
| commit | 38f1231f3ed39b03758a7508eb1b2951ba5ef0a8 (patch) | |
| tree | 1315a7a3912ccb55d8fb788861a6fb1441604c73 /src/pkg/exec/exec.go | |
| parent | 285312a05cdaaadad93878f693c6cc90a02ca902 (diff) | |
| download | go-38f1231f3ed39b03758a7508eb1b2951ba5ef0a8.tar.xz | |
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
https://golang.org/cl/1704044
Diffstat (limited to 'src/pkg/exec/exec.go')
| -rw-r--r-- | src/pkg/exec/exec.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/exec/exec.go b/src/pkg/exec/exec.go index 415b900b9c..ee3cec686b 100644 --- a/src/pkg/exec/exec.go +++ b/src/pkg/exec/exec.go @@ -208,7 +208,7 @@ func LookPath(file string) (string, os.Error) { return "", os.ENOENT } pathenv := os.Getenv("PATH") - for _, dir := range strings.Split(pathenv, ":", 0) { + for _, dir := range strings.Split(pathenv, ":", -1) { if dir == "" { // Unix shell semantics: path element "" means "." dir = "." |
