From 666c528326b881460f2b677e20a2a9bc4d86898f Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Thu, 14 Sep 2017 19:06:44 +0100 Subject: [PATCH] Call game_id_change_notify_function after deserialisation. That's a case in which the current game IDs have changed, so the midend ought to be calling the front-end function (if any) that notifies it when that happens. The only front end of mine that was affected by this missing call was the Javascript one, which uses that callback to update the 'Link to this puzzle' links below the game canvas - but, of course, that front end didn't ever call midend_deserialise until this month, so no wonder I never noticed before. (But downstream front ends might be affected too, for all I know.) --- midend.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/midend.c b/midend.c index 2eb5ee9..3059d6b 100644 --- a/midend.c +++ b/midend.c @@ -2059,6 +2059,8 @@ char *midend_deserialise(midend *me, me->ourgame->new_drawstate(me->drawing, me->states[me->statepos-1].state); midend_size_new_drawstate(me); + if (me->game_id_change_notify_function) + me->game_id_change_notify_function(me->game_id_change_notify_ctx); ret = NULL; /* success! */ -- 2.30.2