Some code improvements

This commit is contained in:
Markus Gans 2015-10-04 00:21:08 +02:00
parent 88f57c0e7e
commit 46974996c7
1 changed files with 2 additions and 2 deletions

View File

@ -1004,10 +1004,10 @@ void FTerm::init()
background_color_erase = false;
x11_button_state = 0x03;
// Import untrusted environment variable TERM
// Import the untrusted environment variable TERM
const char* term_env = getenv(const_cast<char*>("TERM"));
if ( term_env )
strncpy (termtype, term_env, strlen(term_env));
strncpy (termtype, term_env, sizeof(termtype) - 1);
else
strncpy (termtype, const_cast<char*>("vt100"), 6);