shithub: puzzles

Download patch

ref: 68f9fae973e2ffb6c0b9ed1e0761d3a0768455ad
parent: e5d106eb279c12d2454802421e723873e4bae6c2
author: Ben Harris <bjh21@bjh21.me.uk>
date: Sat Jan 7 14:06:51 EST 2023

When loading, don't decode_ui unless we have a UI

If the save file doesn't have a UI line, it's not sensible to try to
decode it.

--- a/midend.c
+++ b/midend.c
@@ -2516,7 +2516,8 @@
     }
 
     data.ui = me->ourgame->new_ui(data.states[0].state);
-    me->ourgame->decode_ui(data.ui, data.uistr);
+    if (data.uistr)
+        me->ourgame->decode_ui(data.ui, data.uistr);
 
     /*
      * Run the externally provided check function, and abort if it