From 04b08da9af0c450d645ab7389d1467308cfc2db8 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Mon, 4 Mar 2013 21:27:36 +0100 Subject: Imported Upstream version 1.1~hg20130304 --- src/pkg/runtime/syscall_windows_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/pkg/runtime/syscall_windows_test.go') diff --git a/src/pkg/runtime/syscall_windows_test.go b/src/pkg/runtime/syscall_windows_test.go index c8327fdef..f04d2cd54 100644 --- a/src/pkg/runtime/syscall_windows_test.go +++ b/src/pkg/runtime/syscall_windows_test.go @@ -112,9 +112,10 @@ func Test64BitReturnStdCall(t *testing.T) { func TestCDecl(t *testing.T) { var buf [50]byte + fmtp, _ := syscall.BytePtrFromString("%d %d %d") a, _, _ := GetDLL(t, "user32.dll").Proc("wsprintfA").Call( uintptr(unsafe.Pointer(&buf[0])), - uintptr(unsafe.Pointer(syscall.StringBytePtr("%d %d %d"))), + uintptr(unsafe.Pointer(fmtp)), 1000, 2000, 3000) if string(buf[:a]) != "1000 2000 3000" { t.Error("cdecl USER32.wsprintfA returns", a, "buf=", buf[:a]) -- cgit v1.2.3