diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/CellBuffer.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx index 1c4e920bf..290478c10 100644 --- a/src/CellBuffer.cxx +++ b/src/CellBuffer.cxx @@ -348,12 +348,12 @@ bool UndoHistory::CanRedo() const { int UndoHistory::StartRedo() { // Drop any leading startAction - if (actions[currentAction].at == startAction && currentAction < maxAction) + if (currentAction < maxAction && actions[currentAction].at == startAction) currentAction++; // Count the steps in this action int act = currentAction; - while (actions[act].at != startAction && act < maxAction) { + while (act < maxAction && actions[act].at != startAction) { act++; } return act - currentAction; |