respect the default/previously set value; don't overwrite it in case of empty strings.
authorWilfried Goesgens <dothebart@citadel.org>
Thu, 5 Jan 2012 20:40:15 +0000 (21:40 +0100)
committerWilfried Goesgens <dothebart@citadel.org>
Tue, 10 Jan 2012 19:26:06 +0000 (20:26 +0100)
citadel/utils/setup.c

index 86e9c1f1694974fa095939f888e68f8df12de562..311f1b28f52fff4b592c96414f0f91a5b018fc61 100644 (file)
@@ -919,7 +919,8 @@ void strprompt(const char *prompt_title, const char *prompt_text, char *Target,
                }
                break;
        case UI_SILENT:
-               strcpy(Target, DefValue);
+               if (*DefValue != '\0')
+                       strcpy(Target, DefValue);
                break;
        }
 }