summaryrefslogtreecommitdiffstats
path: root/linux/getch2.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/getch2.c')
-rw-r--r--linux/getch2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/linux/getch2.c b/linux/getch2.c
index ec5e9ab1d8..dec9b91a0f 100644
--- a/linux/getch2.c
+++ b/linux/getch2.c
@@ -79,6 +79,7 @@ static int success=0;
int load_termcap(char *termtype){
if(!termtype) termtype=getenv("TERM");
+ if(!termtype) termtype="unknown";
success=tgetent(term_buffer, termtype);
if(success<0){ printf("Could not access the 'termcap' data base.\n"); return 0; }
if(success==0){ printf("Terminal type `%s' is not defined.\n", termtype);return 0;}