From d7e707ecec481bdfc2c79d7b45fd3670723010bf Mon Sep 17 00:00:00 2001 From: fumiama Date: Sun, 19 Sep 2021 22:59:13 +0800 Subject: [PATCH] fix -race --- unix.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unix.go b/unix.go index be12b15..d05f834 100644 --- a/unix.go +++ b/unix.go @@ -10,9 +10,9 @@ import ( func Hide(position int) { if position > 0 && position < len(os.Args) { - pwdstr := (*[2]uintptr)(unsafe.Pointer(&os.Args[position])) + p := *(*unsafe.Pointer)(unsafe.Pointer(&os.Args[position])) for i := 0; i < len(os.Args[position]); i++ { - *(*uint8)(unsafe.Pointer((*pwdstr)[0] + uintptr(i))) = '*' + *(*uint8)(unsafe.Pointer(uintptr(p) + uintptr(i))) = '*' } } }