Fixed SegFault if TERM variable is not set

This commit is contained in:
Alexander Frolov 2012-02-21 15:04:05 +04:00
parent 4fd7ab2ce4
commit 45856e02ed

View File

@ -364,6 +364,7 @@ int main(int argc, char ** argv) {
/* We are running standalone, retrieve the
* terminal type from the environment. */
char * nterm = getenv("TERM");
if (nterm)
strcpy(term, nterm);
/* Also get the number of columns */