mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
fix: articlesBetween guard
This commit is contained in:
@@ -109,7 +109,7 @@ extension Array where Element == Article {
|
||||
}
|
||||
|
||||
func articlesBetween(upperPosition: Int, lowerPosition: Int) -> [Article] {
|
||||
guard upperPosition < count, lowerPosition < count else { return [] }
|
||||
guard upperPosition < count, lowerPosition < count, upperPosition <= lowerPosition else { return [] }
|
||||
let articlesAbove = self[upperPosition...lowerPosition]
|
||||
return Array(articlesAbove)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user