Skip to content

Commit 2ca71c0

Browse files
committed
fix mistaken guard
1 parent b9b05c4 commit 2ca71c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/Mach/Core/Messaging/Descriptors.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ extension Mach {
363363
else { fatalError("Descriptor size mismatch.") }
364364

365365
// If we defined `size` and `totalSize` correctly, this should never happen, but we'll check anyway.
366-
guard descriptorPointer + descriptor.size >= startPointer + self.totalSize
366+
guard (descriptorPointer + descriptor.size) <= (startPointer + self.totalSize)
367367
else { fatalError("Descriptor overflow.") }
368368

369369
// Now that we've checked everything, we can safely copy the descriptor.

0 commit comments

Comments
 (0)