Skip to content

Commit

Permalink
Merge pull request #924 from nightmared/fix-utf16-windows
Browse files Browse the repository at this point in the history
fix an invalid shift in windows processes name UTF16 conversion
  • Loading branch information
Lomanic authored Aug 29, 2020
2 parents 7e94bb8 + 04a6f81 commit d9f9a85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion process/process_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,7 @@ func convertUTF16ToString(src []byte) string {

srcIdx := 0
for i := 0; i < srcLen; i++ {
codePoints[i] = uint16(src[srcIdx]) | uint16(src[srcIdx+1]<<8)
codePoints[i] = uint16(src[srcIdx]) | uint16(src[srcIdx+1])<<8
srcIdx += 2
}
return syscall.UTF16ToString(codePoints)
Expand Down

0 comments on commit d9f9a85

Please sign in to comment.