[gnome-tetravex] Fix a crash.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tetravex] Fix a crash.
- Date: Sat, 21 Sep 2019 03:58:15 +0000 (UTC)
commit f70d2e55eabcc9a3ecd58c5e7fe7e3dab8f8082c
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Sat Sep 21 05:58:01 2019 +0200
Fix a crash.
Introduced by Redo work.
src/puzzle.vala | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/puzzle.vala b/src/puzzle.vala
index cc6390c..a240c35 100644
--- a/src/puzzle.vala
+++ b/src/puzzle.vala
@@ -451,7 +451,7 @@ private class Puzzle : Object
private void add_to_history (uint8 x0, uint8 y0, uint8 x1, uint8 y1)
{
- while (last_move_index != 0)
+ while (last_move_index > 0)
{
unowned Inversion? inversion = reversed_history.nth_data (0);
if (inversion == null)
@@ -467,6 +467,7 @@ private class Puzzle : Object
history_length++;
can_undo = true;
+ can_redo = false;
}
internal void undo ()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]