ogarcia / opensudoku

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

Export issue fix #11

Closed spimanov closed 6 years ago

spimanov commented 6 years ago

Hello!

Well, first of all, the previous changes were not a reason of the export issue. :) It's a bug, which was fixed in the first commit (just added "serializer.endDocument();") But anyway, I've added a second commit, which adds a command history processing for import/export operations.

ogarcia commented 6 years ago

Many thanks!

ogarcia commented 6 years ago

@spimanov I found the bug with the new version of sudoku data format. If you export any puzzle with notes it fails to import. Simply start a puzzle, add anotations in any cell, export folder and try to import it.

There is a sample that fails to import.

<game created="0" state="0" time="172746" last_played="0" data="version: 2&#10;3|0|1|5|0|0|2|0|0|0|28||1|0|0|1|6|0|0|0|0|1|0|0|1|0|0|1|1|0|0|6|0|0|8|0|1|9|0|0|0|0|1|0|0|1|0|0|1|0|0|1|4|0|0|7|0|1|4|0|0|9|0|0|8|0|0|0|0|1|3|0|0|6|0|0|2|0|0|0|0|1|4|0|0|2|0|1|5|0|1|0|0|1|0|0|1|0|0|1|8|0|0|0|0|1|0|0|1|6|0|1|8|0|0|3|0|0|2|0|0|0|0|1|1|0|0|5|0|0|9|0|0|0|0|1|9|0|1|7|0|1|1|0|0|0|0|1|0|0|1|0|0|1|0|0|1|0|0|1|2|0|0|0|0|1|9|0|0|7|0|0|3|0|0|0|0|1|5|0|0|2|0|0|4|0|0|0|0|1|2|0|0|0|0|1|0|0|1|0|0|1|0|0|1|9|0|0|0|0|1|5|0|0|6|0|0|0|0|1|0|0|1|0|0|1|1|0|0|0|0|1|0|0|1|9|0|0|7|0|0|0|0|1|" command_stack="15|c4|3|4|4|0|c4|3|4|0|4|c4|3|4|1|0|c4|3|4|0|1|c4|0|0|3|0|c4|2|0|7|0|c4|1|2|8|0|c4|3|1|2|0|c4|5|1|7|0|c4|5|0|9|0|c4|3|2|5|0|c4|4|0|6|0|c2|0|3|16|0|c2|0|3|24|16|c2|0|3|28|24|" />