diff --git a/kernel/config.c b/kernel/config.c index 001705f..d46ca41 100644 --- a/kernel/config.c +++ b/kernel/config.c @@ -137,8 +137,8 @@ UWORD ram_top = 0; /* How much ram in Kbytes */ static UBYTE ErrorAlreadyPrinted[128]; -char master_env[128] = {"PATH="}; /* some shells panic on empty master env. */ -static char *envp = master_env + 6; /* point to the second zero */ +char master_env[128] = {0}; +static char *envp = master_env; struct config Config = { 0, diff --git a/kernel/main.c b/kernel/main.c index 05d6fd8..079eca5 100644 --- a/kernel/main.c +++ b/kernel/main.c @@ -364,6 +364,8 @@ STATIC void kernel() int rc; exb.exec.env_seg = DOS_PSP + 8; + if (master_env[0] == '\0') /* some shells panic on empty master env. */ + strcpy(master_env, "PATH=."); fmemcpy(MK_FP(exb.exec.env_seg, 0), master_env, sizeof(master_env)); /* process 0 */