summaryrefslogtreecommitdiff
path: root/src/pkg/runtime/slice.c
diff options
context:
space:
mode:
authorKen Thompson <ken@golang.org>2009-11-17 20:44:35 -0800
committerKen Thompson <ken@golang.org>2009-11-17 20:44:35 -0800
commitb2a63453dfbb63ff7bb5dc3566cd0bbed0d1df58 (patch)
tree8f331d0407be77fe38bbcf4fbc47d6e86d3048d6 /src/pkg/runtime/slice.c
parent0d80123b63a92941a559e23bae9fcfbd0998fc22 (diff)
downloadgolang-b2a63453dfbb63ff7bb5dc3566cd0bbed0d1df58.tar.gz
bug in copy
R=rsc http://codereview.appspot.com/156056
Diffstat (limited to 'src/pkg/runtime/slice.c')
-rw-r--r--src/pkg/runtime/slice.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/runtime/slice.c b/src/pkg/runtime/slice.c
index 00d9724fb..02839e27c 100644
--- a/src/pkg/runtime/slice.c
+++ b/src/pkg/runtime/slice.c
@@ -189,7 +189,7 @@ runtime·slicecopy(Slice to, Slice fm, uintptr width, int32 ret)
}
ret = fm.len;
- if(to.len > ret)
+ if(to.len < ret)
ret = to.len;
memmove(to.array, fm.array, ret*width);