Commit fd147c8
authored
SwiftWin32: compensate for
### Issue
`GetComputerNameW` disregards the null terminator when returning the
size of the buffer. This leads to the following error when using
`Device.name`:
`Swift/CString.swift:284: Fatal error: input of
decodeCString(_:as:repairingInvalidCodeUnits:) must be null-terminated`
### Solution
Compensated the buffer size to account for the null terminator.GetComputerNameW's disregard of the null terminator1 parent fe0b6b8 commit fd147c8
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
0 commit comments