From 524e63b4a1461d1ff09edefb695755a2d37f1a0c Mon Sep 17 00:00:00 2001 From: tg Date: Fri, 13 Oct 2017 23:02:11 +0000 Subject: [PATCH] fix a longstanding double substitution --- main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index e3351c7..0bcd7ff 100644 --- a/main.c +++ b/main.c @@ -34,7 +34,7 @@ #include #endif -__RCSID("$MirOS: src/bin/mksh/main.c,v 1.343 2017/10/10 21:19:43 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/main.c,v 1.344 2017/10/13 23:02:11 tg Exp $"); extern char **environ; @@ -661,8 +661,7 @@ main_init(int argc, const char *argv[], Source **sp, struct block **lp) if (Flag(FLOGIN)) include(substitute("$HOME/.profile", 0), 0, NULL, true); if (Flag(FTALKING)) { - cp = substitute(substitute("${ENV:-" MKSHRC_PATH "}", - 0), DOTILDE); + cp = substitute("${ENV:-" MKSHRC_PATH "}", DOTILDE); if (cp[0] != '\0') include(cp, 0, NULL, true); }