From 6d862f543aa8a687641aaab3c77aa141c33c0f8d Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Tue, 21 Oct 2014 21:52:21 +0200 Subject: [PATCH] Suppress duplicat autoInstalls If the engine line constructed for -autoInstall already occurs in the engine list, we should not install it again. --- menus.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/menus.c b/menus.c index 9d2b286..086c9b4 100644 --- a/menus.c +++ b/menus.c @@ -1176,6 +1176,7 @@ InstallNewEngine (char *command, char *dir, char *variants, char *protocol) snprintf(buf + strlen(buf), MSG_SIZ - strlen(buf), " -fd %s", dir); if(!strcmp(protocol, "uci")) snprintf(buf + strlen(buf), MSG_SIZ - strlen(buf), " -fUCI"); + if(strstr(firstChessProgramNames, buf)) return; // avoid duplicats // append line quote = malloc(strlen(firstChessProgramNames) + strlen(buf) + 2); sprintf(quote, "%s%s\n", firstChessProgramNames, buf); -- 1.7.0.4