summaryrefslogtreecommitdiff
path: root/src/pkg/runtime/syscall_windows_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/runtime/syscall_windows_test.go')
-rw-r--r--src/pkg/runtime/syscall_windows_test.go3
1 files changed, 2 insertions, 1 deletions
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])