You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sources/FoundationEssentials/Data/Representations/Data+InlineSlice.swift
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -261,7 +261,7 @@ extension Data {
261
261
mutatingfunc resetBytes(in range:Range<Index>){
262
262
assert(range.lowerBound <HalfInt.max)
263
263
assert(range.upperBound <HalfInt.max)
264
-
precondition(range.lowerBound <= endIndex,"index \(range.lowerBound) is out of bounds of \(startIndex)..<\(endIndex)")
264
+
precondition(range.lowerBound >= startIndex && range.lowerBound <= endIndex,"index \(range.lowerBound) is out of bounds of \(startIndex)..<\(endIndex)")
Copy file name to clipboardExpand all lines: Sources/FoundationEssentials/Data/Representations/Data+LargeSlice.swift
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -244,7 +244,7 @@ extension Data {
244
244
245
245
@inlinable // This is @inlinable as reasonably small.
246
246
mutatingfunc resetBytes(in range:Range<Int>){
247
-
precondition(range.lowerBound <= endIndex,"index \(range.lowerBound) is out of bounds of \(startIndex)..<\(endIndex)")
247
+
precondition(range.lowerBound >= startIndex && range.lowerBound <= endIndex,"index \(range.lowerBound) is out of bounds of \(startIndex)..<\(endIndex)")
Copy file name to clipboardExpand all lines: Sources/FoundationEssentials/Data/Representations/Data+Representation.swift
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -187,7 +187,7 @@ extension Data {
187
187
188
188
@export(implementation)
189
189
mutatingfunc resetBytes(in range:Range<Index>){
190
-
precondition(range.lowerBound <= endIndex,"index \(range.lowerBound) is out of bounds of \(startIndex)..<\(endIndex)")
190
+
precondition(range.lowerBound >= startIndex && range.lowerBound <= endIndex,"index \(range.lowerBound) is out of bounds of \(startIndex)..<\(endIndex)")
0 commit comments