Work around segfault in Xcode 13.3 "Release"

Surely some Xcode bug. Doesn't like NSCAssert in inline function.
This commit is contained in:
Davide De Rosa 2022-04-12 21:15:31 +02:00
parent 7b72114893
commit 02e702d97b
1 changed files with 2 additions and 1 deletions

View File

@ -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;