From 092ef8a2ca60e1a7573442757b02ec1efc456c2c Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Fri, 8 Apr 2016 14:27:35 +1200 Subject: [PATCH] cmd/cgo: fix cgo with gccgo Change-Id: I1780899255e22c16d7f8e9947609a1c284d7c42e Reviewed-on: https://go-review.googlesource.com/21690 Reviewed-by: David Crawshaw Run-TryBot: Michael Hudson-Doyle TryBot-Result: Gobot Gobot --- src/cmd/cgo/out.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/cgo/out.go b/src/cmd/cgo/out.go index 621c41c6b23..88b0147364e 100644 --- a/src/cmd/cgo/out.go +++ b/src/cmd/cgo/out.go @@ -1451,7 +1451,7 @@ const char *_cgoPREFIX_Cfunc_CString(struct __go_string s) { void *_cgoPREFIX_Cfunc_CBytes(struct __go_open_array b) { char *p = malloc(b.__count); - memmove(p, b.__data, b.__count); + memmove(p, b.__values, b.__count); return p; }