[gcompris/gcomprixogoo] Fix an off-by-one bug in the calculation of the amount of levels, which made it



commit 9fb1e1fe773039b8fa9e95c38e9d3160fbf63999
Author: Wolfram Sang <wolfram iswi org>
Date:   Fri Jun 19 23:20:04 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.
    
    Conflicts:
    
    	src/boards/shapegame.c

 src/babymatch-activity/shapegame.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/babymatch-activity/shapegame.c b/src/babymatch-activity/shapegame.c
index 797a414..7ea6d2b 100644
--- a/src/babymatch-activity/shapegame.c
+++ b/src/babymatch-activity/shapegame.c
@@ -247,9 +247,10 @@ 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);
 	}
       g_free(filename);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]