Do not save ICS password in command history
[xboard.git] / dialogs.c
index 9def05c..50f40b1 100644 (file)
--- a/dialogs.c
+++ b/dialogs.c
@@ -1310,10 +1310,12 @@ char *icsText;
 #define HISTORY_SIZE 64
 static char *history[HISTORY_SIZE];
 static int histIn = 0, histP = 0;
+static Boolean noEcho;
 
 static void
 SaveInHistory (char *cmd)
 {
+  if(noEcho) return; // do not save password!
   if (history[histIn] != NULL) {
     free(history[histIn]);
     history[histIn] = NULL;
@@ -2156,8 +2158,6 @@ ConsoleAutoPopUp (char *buf)
        } else PopUpMoveDialog(*buf);
 }
 
-static Boolean noEcho;
-
 void
 EchoOn ()
 {