Some code improvements
This commit is contained in:
parent
5842a74a19
commit
c00e3e3d80
|
@ -1002,9 +1002,10 @@ void FTerm::init()
|
||||||
background_color_erase = false;
|
background_color_erase = false;
|
||||||
x11_button_state = 0x03;
|
x11_button_state = 0x03;
|
||||||
|
|
||||||
char const* term_env = getenv("TERM");
|
// Import untrusted environment variable TERM
|
||||||
if ( term_env ) // Import untrusted environment variable TERM
|
const char* term_env = getenv("TERM");
|
||||||
snprintf(termtype, sizeof(termtype), "%s", getenv("TERM"));
|
if ( term_env )
|
||||||
|
snprintf(termtype, sizeof(termtype), "%s", term_env);
|
||||||
else
|
else
|
||||||
strncpy (termtype, const_cast<char*>("vt100"), 6);
|
strncpy (termtype, const_cast<char*>("vt100"), 6);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue