From 71a88a79ac75ccaca1986af7d3616563cbb2f74f Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 6 Apr 2009 21:14:38 -0700 Subject: an early 6g limitation forced the use of string(b)[0:n] instead of the more direct string(b[0:n]). convert to the more direct form. R=r DELTA=5 (0 added, 0 deleted, 5 changed) OCL=27082 CL=27140 --- src/lib/syscall/errstr_darwin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/syscall/errstr_darwin.go') diff --git a/src/lib/syscall/errstr_darwin.go b/src/lib/syscall/errstr_darwin.go index 1ea357601..abb79b884 100644 --- a/src/lib/syscall/errstr_darwin.go +++ b/src/lib/syscall/errstr_darwin.go @@ -231,7 +231,7 @@ func str(val int64) string { // do it here rather than with fmt to avoid depend val /= 10; } buf[i] = byte(val + '0'); - return string(buf)[i:len(buf)]; + return string(buf[i:len(buf)]); } func Errstr(errno int64) string { -- cgit v1.2.3