termtype was not null terminated

This commit is contained in:
Markus Gans 2017-03-26 21:44:09 +02:00
parent 4b93b71a6d
commit d7aa8f3a70
1 changed files with 1 additions and 1 deletions

View File

@ -2668,7 +2668,7 @@ void FTerm::init_termcaps()
if ( status != success )
{
// use xterm as fallback if not found
std::strncpy (termtype, const_cast<char*>("xterm"), 5);
std::strncpy (termtype, const_cast<char*>("xterm"), 6);
status = tgetent(term_buffer, termtype);
if ( status != success )