summaryrefslogtreecommitdiff
path: root/src/pkg/patch
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/patch
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/patch')
-rw-r--r--src/pkg/patch/patch.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/patch/patch.go b/src/pkg/patch/patch.go
index 9d9aa1b48..d4977dc99 100644
--- a/src/pkg/patch/patch.go
+++ b/src/pkg/patch/patch.go
@@ -319,4 +319,4 @@ func hasPrefix(s []byte, t string) bool {
// splitLines returns the result of splitting s into lines.
// The \n on each line is preserved.
-func splitLines(s []byte) [][]byte { return bytes.SplitAfter(s, newline, 0) }
+func splitLines(s []byte) [][]byte { return bytes.SplitAfter(s, newline, -1) }