Skip to content

Commit 3e5ccf0

Browse files
committed
Fix incorrect implementation of "4.2 performance workaround" for ByteReader.bytesLeft
1 parent b9f9cd4 commit 3e5ccf0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Sources/ByteReader.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public class ByteReader {
3737
public var bytesLeft: Int {
3838
#if swift(>=4.1.50) || (swift(>=3.4) && !swift(>=4.0))
3939
return { (data: Data, offset: Int) -> Int in
40-
self.data.endIndex - self.offset
40+
return data.endIndex - offset
4141
} (self.data, self.offset)
4242
#else
4343
return self.data.endIndex - self.offset

0 commit comments

Comments
 (0)