Skip to content

Commit

Permalink
Work around segfault in Xcode 13.3 "Release"
Browse files Browse the repository at this point in the history
Surely some Xcode bug. Doesn't like NSCAssert in inline function.
  • Loading branch information
keeshux committed Apr 12, 2022
1 parent 7b72114 commit 02e702d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/CTunnelKitOpenVPNProtocol/include/PacketMacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ static inline void PacketSwap(uint8_t *ptr, NSInteger len1, NSInteger len2)

static inline void PacketSwapCopy(uint8_t *dst, NSData *src, NSInteger len1, NSInteger len2)
{
NSCAssert(src.length >= len1 + len2, @"src is smaller than expected");
// XXX: this line segfaults Xcode 13.3 on Archive
// NSCAssert(src.length >= len1 + len2, @"src is smaller than expected");
memcpy(dst, src.bytes + len1, len2);
memcpy(dst + len2, src.bytes, len1);
const NSInteger preambleLength = len1 + len2;
Expand Down

0 comments on commit 02e702d

Please sign in to comment.