Some code improvements
This commit is contained in:
parent
88f57c0e7e
commit
46974996c7
|
@ -1004,10 +1004,10 @@ void FTerm::init()
|
||||||
background_color_erase = false;
|
background_color_erase = false;
|
||||||
x11_button_state = 0x03;
|
x11_button_state = 0x03;
|
||||||
|
|
||||||
// Import untrusted environment variable TERM
|
// Import the untrusted environment variable TERM
|
||||||
const char* term_env = getenv(const_cast<char*>("TERM"));
|
const char* term_env = getenv(const_cast<char*>("TERM"));
|
||||||
if ( term_env )
|
if ( term_env )
|
||||||
strncpy (termtype, term_env, strlen(term_env));
|
strncpy (termtype, term_env, sizeof(termtype) - 1);
|
||||||
else
|
else
|
||||||
strncpy (termtype, const_cast<char*>("vt100"), 6);
|
strncpy (termtype, const_cast<char*>("vt100"), 6);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue