chiark / gitweb /
Fix assertion failure if you Undo right at startup.
authorSimon Tatham <anakin@pobox.com>
Fri, 6 Oct 2017 18:49:05 +0000 (19:49 +0100)
committerSimon Tatham <anakin@pobox.com>
Fri, 6 Oct 2017 18:49:05 +0000 (19:49 +0100)
commitf6b2f47ef3feca86b0d16c28b607acdea5fc6235
tree3d5b4cd17fbd41967e71626dd50ac7e6b6eab2b5
parenta58c1b216bb1d4547f7b2ef2703fe2d0cd3b5cac
Fix assertion failure if you Undo right at startup.

The initial call to midend_new_game() was creating a partial
serialisation containing no game states at all, which meant that if
your first UI action was an undo operation, the game would try to
deserialise that and complain that it was incomplete. Now we detect
that in advance and don't create a useless serialisation in the first
place.
midend.c