ogarcia / opensudoku

Open Source Sudoku game for Android.
GNU General Public License v3.0
328 stars 144 forks source link

Fix crash when using the new feature to automatically remove cell notes #67

Closed jlnordin closed 4 years ago

jlnordin commented 4 years ago

This fixes a bug where if you use the new "automatically remove notes on entry" feature and you entered the number "9", you would crash if you ever left the puzzle and restarted it. It is possible to get into a state where loading a game-in-progress will always cause a crash. This is bad!

This was caused by a bug in the deserialization code for the new command.

Fortunately, with this fix, existing games that are in this state will be fixed when upgrading to the latest version and play can continue.

jlnordin commented 4 years ago

@ogarcia : This is a pretty bad (and embarrassing) bug I found with the latest feature I added. This PR fixes it for any existing games if anyone was using the new feature.

In the best case scenario "undo" won't work properly after leaving the game and continuing it when using this feature. In the worst case scenario the current Sudoku game will always crash when resuming it.

ogarcia commented 4 years ago

@jlnordin no problem, sometimes this things happens :wink: New version uploaded with this fix :smiley: