We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19e3979 commit 9b99a45Copy full SHA for 9b99a45
Sources/FoundationEssentials/ProcessInfo/ProcessInfo.swift
@@ -229,7 +229,7 @@ final class _ProcessInfo: Sendable {
229
_ = GetUserNameExW(NameDisplay, nil, &ulLength)
230
231
return withUnsafeTemporaryAllocation(of: WCHAR.self, capacity: Int(ulLength)) { wszBuffer in
232
- guard GetUserNameExW(NameDisplay, wszBuffer.baseAddress!, &ulLength) == 0 else {
+ guard GetUserNameExW(NameDisplay, wszBuffer.baseAddress!, &ulLength) != 0 else {
233
return ""
234
}
235
return String(decoding: wszBuffer.prefix(Int(ulLength)), as: UTF16.self)
0 commit comments