diff options
author | Wolfram Sang <wolfram@iswi.org> | 2009-06-18 22:14:02 (GMT) |
---|---|---|
committer | Bruno Coudoin <bruno.coudoin@free.fr> | 2009-06-19 19:43:08 (GMT) |
commit | 622c0d150ee5a9529d39b2e1742b8167e3f059ef (patch) | |
tree | 41673d71de8f2104dc44c475a429a9cb6ff9ca34 | |
parent | 66de2bbc9a94618133b93e6c941a9b14dd503f96 (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.
-rw-r--r-- | 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); |