[Mplayer-cvslog] CVS: main/linux getch2.c,1.15,1.16

Arpi of Ize arpi at mplayerhq.hu
Sat Jan 11 13:32:43 CET 2003


Update of /cvsroot/mplayer/main/linux
In directory mail:/var/tmp.root/cvs-serv15280

Modified Files:
	getch2.c 
Log Message:
The attached little patch fixes a core dump on termcap systems when
$TERM is undefined.
Frederick Bruckman <fredb at immanent.net>


Index: getch2.c
===================================================================
RCS file: /cvsroot/mplayer/main/linux/getch2.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- getch2.c	1 Nov 2002 00:05:56 -0000	1.15
+++ getch2.c	11 Jan 2003 12:32:24 -0000	1.16
@@ -79,6 +79,7 @@
 
 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;}



More information about the MPlayer-cvslog mailing list