Merge pull request #14 from froller/master
Fixed SegFault if TERM variable is not set
This commit is contained in:
commit
0f5778a4a3
@ -364,6 +364,7 @@ int main(int argc, char ** argv) {
|
|||||||
/* We are running standalone, retrieve the
|
/* We are running standalone, retrieve the
|
||||||
* terminal type from the environment. */
|
* terminal type from the environment. */
|
||||||
char * nterm = getenv("TERM");
|
char * nterm = getenv("TERM");
|
||||||
|
if (nterm)
|
||||||
strcpy(term, nterm);
|
strcpy(term, nterm);
|
||||||
|
|
||||||
/* Also get the number of columns */
|
/* Also get the number of columns */
|
||||||
|
Loading…
Reference in New Issue
Block a user