# HG changeset patch # User Guido Berhoerster # Date 1414163532 -7200 # Node ID aec74ae4d6e531d6a68788bf11312ef9c134ad2b # Parent 868670fcc17b4c7fc3aeab53f77f8536422579f8 Fix the logic checking whether a generated board is playable diff -r 868670fcc17b -r aec74ae4d6e5 board.c --- a/board.c Fri Oct 24 17:00:42 2014 +0200 +++ b/board.c Fri Oct 24 17:12:12 2014 +0200 @@ -110,14 +110,14 @@ (short)(rantaiwarna_rand(&board->seed) % board->colors) + 1; } - if (board_check_status(board) & GAME_OVER) { - return (ERR); + if (!(board_check_status(board) & GAME_OVER)) { + break; } } board->score = 0; - return (OK); + return (!(board->status & GAME_OVER) ? OK : ERR); } int