Merge pull request #14 from froller/master

Fixed SegFault if TERM variable is not set
This commit is contained in:
Kevin Lange 2012-02-21 07:18:12 -08:00
commit 0f5778a4a3
1 changed files with 2 additions and 1 deletions

View File

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