Skip to content

Commit 9030208

Browse files
committed
Fix bug [SR-4391]: index check should be || instead of &&
1 parent d84db67 commit 9030208

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Foundation/NSOrderedSet.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ extension NSOrderedSet {
148148
open func objects(at indexes: IndexSet) -> [Any] {
149149
var entries = [Any]()
150150
for idx in indexes {
151-
if idx >= count && idx < 0 {
151+
if idx >= count || idx < 0 {
152152
fatalError("\(self): Index out of bounds")
153153
}
154154
entries.append(object(at: idx))

0 commit comments

Comments
 (0)