[gnome-nibbles] Fix a crash.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-nibbles] Fix a crash.
- Date: Sun, 1 Nov 2020 15:24:24 +0000 (UTC)
commit 060c03addd0932b0e859db1ec73b9f8776c62182
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Sun Nov 1 16:23:15 2020 +0100
Fix a crash.
Fixes #51.
src/scoreboard.vala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/scoreboard.vala b/src/scoreboard.vala
index d34f042..a41aee1 100644
--- a/src/scoreboard.vala
+++ b/src/scoreboard.vala
@@ -97,8 +97,8 @@ private class PlayerScoreBox : Box
internal void update_lives (uint8 lives_left)
{
/* Remove lost lives - if any */
- for (uint8 i = (uint8) life_images.size - 1; i >= lives_left; i--)
- life_images[i].set_opacity (0);
+ for (uint8 i = (uint8) life_images.size; i > lives_left; i--)
+ life_images[i - 1].set_opacity (0);
/* Add new lives - if any */
for (uint8 i = 0; i < lives_left; i++)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]