Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfram Sang <wolfram@iswi.org>2009-06-19 21:20:04 (GMT)
committer Bruno Coudoin <bruno.coudoin@free.fr>2009-06-19 22:06:46 (GMT)
commit4c10289f279f221431a793b94d591212e44c4c0e (patch)
tree5b741f1fc539a5582eddf338ef4794a45271677d
parent99275597dac084db6fec4e6bcbb08abd74618987 (diff)
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
-rw-r--r--src/babymatch-activity/shapegame.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/babymatch-activity/shapegame.c b/src/babymatch-activity/shapegame.c
index 4fa9a03..f143d92 100644
--- a/src/babymatch-activity/shapegame.c
+++ b/src/babymatch-activity/shapegame.c
@@ -264,10 +264,11 @@ static void start_board (GcomprisBoard *agcomprisBoard)
gcomprisBoard->maxlevel=1;
/**/
while( (filename = gc_file_find_absolute("%s/board%d_0.xml",
- gcomprisBoard->boarddir,
- gcomprisBoard->maxlevel++,
- NULL)) )
+ gcomprisBoard->boarddir,
+ gcomprisBoard->maxlevel,
+ NULL)) )
{
+ gcomprisBoard->maxlevel++;
g_free(filename);
}
@@ -1314,7 +1315,7 @@ add_shape_to_canvas(Shape *shape)
{
shape->w = (double)gdk_pixbuf_get_width(pixmap) * shape->zoomx;
shape->h = (double)gdk_pixbuf_get_height(pixmap) * shape->zoomy;
-
+
/* Display the shape itself but hide it until the user puts the right shape on it */
/* I have to do it this way for the positionning (lower/raise) complexity */
item = gnome_canvas_item_new (GNOME_CANVAS_GROUP(shape_root_item),