Don't strip path from engine name if directory given
authorH.G. Muller <h.g.muller@hccnet.nl>
Tue, 10 Apr 2012 16:39:25 +0000 (18:39 +0200)
committerH.G. Muller <h.g.muller@hccnet.nl>
Tue, 10 Apr 2012 16:39:25 +0000 (18:39 +0200)
backend.c

index cc42334..58f8079 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -920,7 +920,7 @@ Load (ChessProgramState *cps, int i)
     while(q = strchr(p, SLASH)) p = q+1;
     if(*p== NULLCHAR) { DisplayError(_("You did not specify the engine executable"), 0); return; }
     if(engineDir[0] != NULLCHAR) {
-       ASSIGN(appData.directory[i], engineDir);
+       ASSIGN(appData.directory[i], engineDir); p = engineName;
     } else if(p != engineName) { // derive directory from engine path, when not given
        p[-1] = 0;
        ASSIGN(appData.directory[i], engineName);