---- main.c~ 2011-07-07 18:15:26.961632040 +0100
-+++ main.c 2011-07-07 18:15:50.664694256 +0100
-@@ -532,10 +532,14 @@
- char *env_file;
-
- /* include $ENV */
-- env_file = substitute(substitute("${ENV:-" MKSHRC_PATH "}", 0),
-- DOTILDE);
-+ env_file = substitute(substitute("${ENV}", 0), DOTILDE);
- if (*env_file != '\0')
- include(env_file, 0, NULL, true);
-+ else {
-+ env_file = substitute(MKSHRC_PATH, DOTILDE);
-+ include("/etc/mkshrc", 0, NULL, true);
-+ include(env_file, 0, NULL, true);
-+ }
+diff -ur mksh.orig/main.c mksh/main.c
+--- mksh.orig/main.c 2020-10-01 22:29:21.000000000 +0200
++++ mksh/main.c 2021-01-18 19:11:59.615180226 +0100
+@@ -695,9 +695,14 @@
+ if (Flag(FLOGIN))
+ include(substitute("$HOME/.profile", 0), 0, NULL, true);
+ if (Flag(FTALKING)) {
+- cp = substitute("${ENV:-" MKSHRC_PATH "}", DOTILDE);
++ cp = substitute("${ENV}", DOTILDE);
+ if (cp[0] != '\0')
+ include(cp, 0, NULL, true);
++ else {
++ cp = substitute(MKSHRC_PATH, DOTILDE);
++ include("/etc/mkshrc", 0, NULL, true);
++ include(cp, 0, NULL, true);
++ }
+ }
}
-
- if (restricted) {
+ if (restricted_shell) {