IOS-2794 Use less bytes in truncateLeadingBytes

IOS-2794
Dirk Zimmermann 2 years ago
parent 5201994d0c
commit 2763eb75f2

@ -72,7 +72,9 @@ NS_ASSUME_NONNULL_BEGIN
typeof(self) strongSelf = weakSelf;
NSUInteger length = strongSelf.data.length - numBytes;
NSData *newData = [strongSelf.data subdataWithRange:NSMakeRange(numBytes, length)];
strongSelf.data = [NSMutableData dataWithData: newData];
[strongSelf.data replaceBytesInRange:NSMakeRange(0, length)
withBytes:newData.bytes];
strongSelf.data.length -= numBytes;
});
}

Loading…
Cancel
Save