midend_apply_prefs: apply prefs to the right ui.

The function takes a game_ui pointer as an argument, and then ignores
it and unconditionally applies the midend's saved preferences to me->ui.
This commit is contained in:
Simon Tatham
2023-05-02 19:51:29 +01:00
parent e0bb6d3b85
commit 89e9026ee4

View File

@ -2878,7 +2878,7 @@ static void midend_apply_prefs(midend *me, game_ui *ui)
rctx->len = me->be_prefs.len; rctx->len = me->be_prefs.len;
rctx->pos = 0; rctx->pos = 0;
const char *err = midend_deserialise_prefs( const char *err = midend_deserialise_prefs(
me, me->ui, midend_serialise_buf_read, rctx); me, ui, midend_serialise_buf_read, rctx);
/* This should have come from our own serialise function, so /* This should have come from our own serialise function, so
* it should never be invalid. */ * it should never be invalid. */
assert(!err && "Bad internal serialisation of preferences"); assert(!err && "Bad internal serialisation of preferences");