Skip to content

Commit d44705d

Browse files
neonichuahoppen
authored andcommitted
load => loadUnaligned
Same fix as swiftlang/swift-package-manager#6929 since the code in swift-syntax is based on what is in SwiftPM.
1 parent 666f336 commit d44705d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/SwiftCompilerPlugin/CompilerPlugin.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ internal struct PluginHostConnection: MessageConnection {
210210

211211
// Decode the count.
212212
let count = header.withUnsafeBytes {
213-
UInt64(littleEndian: $0.load(as: UInt64.self))
213+
UInt64(littleEndian: $0.loadUnaligned(as: UInt64.self))
214214
}
215215
guard count >= 2 else {
216216
throw PluginMessageError.invalidPayloadSize

0 commit comments

Comments
 (0)