[gcompris/GCOMPRIS_8_3] Fix an off-by-one bug in the calculation of the amount of levels, which made it
- From: Bruno Coudoin <bcoudoin src gnome org>
- To: svn-commits-list gnome org
- Subject: [gcompris/GCOMPRIS_8_3] Fix an off-by-one bug in the calculation of the amount of levels, which made it
- Date: Fri, 19 Jun 2009 15:59:33 -0400 (EDT)
commit 622c0d150ee5a9529d39b2e1742b8167e3f059ef
Author: Wolfram Sang <wolfram iswi org>
Date: Fri Jun 19 00:14:02 2009 +0200
Fix an off-by-one bug in the calculation of the amount of levels, which made it
possible to see the end-sequence just by clicking the dice.
src/boards/shapegame.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/boards/shapegame.c b/src/boards/shapegame.c
index 3f62f2c..b2dc781 100644
--- a/src/boards/shapegame.c
+++ b/src/boards/shapegame.c
@@ -262,14 +262,12 @@ static void start_board (GcomprisBoard *agcomprisBoard)
/**/
while( (filename = gc_file_find_absolute("%s/board%d_0.xml",
gcomprisBoard->boarddir,
- gcomprisBoard->maxlevel++,
+ gcomprisBoard->maxlevel,
NULL)) )
{
+ gcomprisBoard->maxlevel++;
g_free(filename);
-
}
-
- /**/
gcomprisBoard->maxlevel--;
gc_bar_set(GC_BAR_CONFIG|GC_BAR_LEVEL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]