Skip to content

Commit

Permalink
Fix generator increment
Browse files Browse the repository at this point in the history
`next()` is trying to go backwards, thus at most one item is iterated.
  • Loading branch information
rivera-ernesto committed Mar 26, 2015
1 parent c9157a9 commit 9a47ecb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/Core/SugarRecordResults.swift
Expand Up @@ -113,6 +113,6 @@ public class SRResultsGenerator: GeneratorType {
if (nextIndex < 0) {
return nil
}
return self.results[nextIndex--]
return self.results[nextIndex++]
}
}

0 comments on commit 9a47ecb

Please sign in to comment.