Make Claws glyph available in non-Chu variants
[xboard.git] / menus.c
diff --git a/menus.c b/menus.c
index 9d2b286..a92a152 100644 (file)
--- a/menus.c
+++ b/menus.c
@@ -105,6 +105,7 @@ extern char *getenv();
 char  *gameCopyFilename, *gamePasteFilename;
 Boolean saveSettingsOnExit;
 char *settingsFileName;
+char gamesDir[MSG_SIZ], positionsDir[MSG_SIZ], textureDir[MSG_SIZ], bookDir[MSG_SIZ], piecesDir[MSG_SIZ];
 
 static int
 LoadGamePopUp (FILE *f, int gameNumber, char *title)
@@ -1176,6 +1177,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);