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.
2 parents b539999 + b3cb43f commit c1414a7Copy full SHA for c1414a7
Sources/BuildServerIntegration/CompilationDatabase.swift
@@ -206,8 +206,9 @@ enum CompilationDatabaseDecodingError: Error {
206
fileprivate extension String {
207
var isAbsolutePath: Bool {
208
#if os(Windows)
209
- Array(self.utf16).withUnsafeBufferPointer { buffer in
210
- return !PathIsRelativeW(buffer.baseAddress)
+ // PathIsRelativeW requires a null-terminated UTF16 encoded string
+ return withCString(encodedAs: UTF16.self) { ptr in
211
+ return !PathIsRelativeW(ptr)
212
}
213
#else
214
return self.hasPrefix("/")
0 commit comments