Fix error message on engine load
authorH.G. Muller <h.g.muller@hccnet.nl>
Mon, 2 May 2011 22:17:47 +0000 (00:17 +0200)
committerH.G. Muller <h.g.muller@hccnet.nl>
Wed, 4 May 2011 18:43:02 +0000 (20:43 +0200)
backend.c
winboard/wsettings.c

index 9e2a6ca..466809b 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -876,7 +876,7 @@ Load(ChessProgramState *cps, int i)
     }
     p = engineName;
     while(q = strchr(p, SLASH)) p = q+1;
-    if(*p== NULLCHAR) { DisplayError(_("You did not give an engine executable"), 0); return; }
+    if(*p== NULLCHAR) { DisplayError(_("You did not specify the engine executable"), 0); return; }
     if(engineDir[0] != NULLCHAR)
        appData.directory[i] = engineDir;
     else if(p != engineName) { // derive directory from engine path, when not given
index 43fcd06..58040c9 100644 (file)
@@ -644,6 +644,7 @@ void LoadEnginePopUp(HWND hwnd)
     if(nickName)     free(nickName);     nickName = strdup("");\r
     if(engineChoice) free(engineChoice); engineChoice = strdup(engineNr[0]);\r
     if(engineLine)   free(engineLine);   engineLine = strdup("");\r
+    if(engineName)   free(engineName);   engineName = strdup("");\r
     NamesToList(firstChessProgramNames, engineList, engineMnemonic);\r
     while(engineList[n]) n++; installOptions[0].max = n;\r
     snprintf(title, MSG_SIZ, _("Load Engine"));\r