Skip to content

Commit c36ac5f

Browse files
authored
Merge pull request #1065 from wordpress-mobile/fix/only-remove-actual-history-items
Do not iterate in while when history cursor is outside of list range
2 parents 2b3694c + 12c557a commit c36ac5f

File tree

1 file changed

+1
-1
lines changed
  • aztec/src/main/kotlin/org/wordpress/aztec

1 file changed

+1
-1
lines changed

aztec/src/main/kotlin/org/wordpress/aztec/History.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class History(val historyEnabled: Boolean, val historySize: Int) {
6161
return
6262
}
6363

64-
while (historyCursor != historyList.size && historyCursor >= 0) {
64+
while (historyCursor in 0 until historyList.size) {
6565
historyList.removeAt(historyCursor)
6666
}
6767

0 commit comments

Comments
 (0)