mirror of
https://github.com/golang/go
synced 2024-11-22 09:24:41 -07:00
syscall: fix windows copyFindData
R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/6301076
This commit is contained in:
parent
8140cd9149
commit
1c4e20744a
@ -376,11 +376,9 @@ func copyFindData(dst *Win32finddata, src *win32finddata1) {
|
|||||||
dst.Reserved0 = src.Reserved0
|
dst.Reserved0 = src.Reserved0
|
||||||
dst.Reserved1 = src.Reserved1
|
dst.Reserved1 = src.Reserved1
|
||||||
|
|
||||||
// The src is 1 element shorter than dst. Zero that last one.
|
// The src is 1 element bigger than dst, but it must be NUL.
|
||||||
copy(dst.FileName[:], src.FileName[:])
|
copy(dst.FileName[:], src.FileName[:])
|
||||||
dst.FileName[len(dst.FileName)-1] = 0
|
|
||||||
copy(dst.AlternateFileName[:], src.AlternateFileName[:])
|
copy(dst.AlternateFileName[:], src.AlternateFileName[:])
|
||||||
src.AlternateFileName[len(dst.AlternateFileName)-1] = 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type ByHandleFileInformation struct {
|
type ByHandleFileInformation struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user