diff options
Diffstat (limited to 'apps/plugins/sudoku')
-rw-r--r-- | apps/plugins/sudoku/sudoku.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/plugins/sudoku/sudoku.c b/apps/plugins/sudoku/sudoku.c index 02de4083dd..412b197ae8 100644 --- a/apps/plugins/sudoku/sudoku.c +++ b/apps/plugins/sudoku/sudoku.c | |||
@@ -759,9 +759,9 @@ bool load_sudoku(struct sudoku_state_t* state, char* filename) | |||
759 | } | 759 | } |
760 | 760 | ||
761 | /* Check that the board is valid - we need to check every row/column | 761 | /* Check that the board is valid - we need to check every row/column |
762 | individually, so we check the diagonal from top-left to bottom-right */ | 762 | and block individually */ |
763 | for (state->x = 0; state->x < 9; state->x++) { | 763 | for (state->y = 0; state->y < 9; state->y++) { |
764 | state->y = state->x; | 764 | state->x = (state->y%3)*3 + (state->y/3); |
765 | if (check_status(state)) return false; | 765 | if (check_status(state)) return false; |
766 | } | 766 | } |
767 | state->x = 0; | 767 | state->x = 0; |