From 6a09eeb50d1e12bcfae0a9e782727c535dc609f5 Mon Sep 17 00:00:00 2001 From: jkh Date: Sun, 22 Oct 1995 14:10:08 +0000 Subject: Don't assume that $HOME is always set. --- usr.bin/ee/ee.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'usr.bin') diff --git a/usr.bin/ee/ee.c b/usr.bin/ee/ee.c index 876a58c..75c6994 100644 --- a/usr.bin/ee/ee.c +++ b/usr.bin/ee/ee.c @@ -49,7 +49,7 @@ | proprietary information which is protected by | copyright. All rights are reserved. | - | $Header: /home/ncvs/src/usr.bin/ee/ee.c,v 1.2 1995/08/30 17:11:54 ache Exp $ + | $Header: /home/ncvs/src/usr.bin/ee/ee.c,v 1.3 1995/08/30 17:42:28 ache Exp $ | */ @@ -62,7 +62,7 @@ char *ee_long_notice[] = { "copyright. All rights are reserved." }; -char *version = "@(#) ee, version 1.2.4 $Revision: 1.2 $"; +char *version = "@(#) ee, version 1.2.4 $Revision: 1.3 $"; #ifdef NCURSE #include "new_curse.h" @@ -3799,6 +3799,8 @@ ee_init() /* check for init file and read it if it exists */ int temp_int; string = getenv("HOME"); + if (!string) + string = "/root"; /* Set to reasonable default so we don't crash */ str1 = home = malloc(strlen(string)+10); strcpy(home, string); strcat(home, "/.init.ee"); -- cgit v1.1