From ab6f75e012f36005a85de3bb1c49b9c4e48b026e Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Fri, 2 Dec 2016 09:00:19 +0100 Subject: [PATCH] Report error when saving of engine settings fails When the current engine was not chosen from the Engine List, or is no loger in there, we now print a complaint in the message field. --- backend.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend.c b/backend.c index 12aadc1..6e1da23 100644 --- a/backend.c +++ b/backend.c @@ -11274,9 +11274,9 @@ void SaveEngineSettings (int n) { int len; char *p, *q, *s, buf[MSG_SIZ], *optionSettings; - if(!currentEngine[n] || !currentEngine[n][0]) return; // no engine from list is loaded + if(!currentEngine[n] || !currentEngine[n][0]) { DisplayMessage("saving failed: engine not from list", ""); return; } // no engine from list is loaded p = strstr(firstChessProgramNames, currentEngine[n]); - if(!p) return; // sanity check; engine could be deleted from list after loading + if(!p) { DisplayMessage("saving failed: engine not found in list", ""); return; } // sanity check; engine could be deleted from list after loading optionSettings = ResendOptions(n ? &second : &first, FALSE); len = strlen(currentEngine[n]); q = p + len; *p = 0; // cut list into head and tail piece -- 1.7.0.4