diff --git a/input.cpp b/input.cpp index 7204031d7..e9cf4037c 100644 --- a/input.cpp +++ b/input.cpp @@ -324,7 +324,7 @@ int input_init() debug( 0, _( L"Could not set up terminal" ) ); exit(1); } - output_set_term( env_get( L"TERM" ) ); + output_set_term( env_get_string( L"TERM" ).c_str() ); input_terminfo_init(); diff --git a/output.cpp b/output.cpp index 0bc4e252d..8902628ac 100644 --- a/output.cpp +++ b/output.cpp @@ -587,7 +587,7 @@ int output_color_code( const wchar_t *val ) } -void output_set_term( wchar_t *term ) +void output_set_term( const wchar_t *term ) { current_term = halloc_wcsdup(global_context, term); } diff --git a/output.h b/output.h index 0c8faa4b1..896e40fea 100644 --- a/output.h +++ b/output.h @@ -154,7 +154,7 @@ int (*output_get_writer())(char) ; /** Set the terminal name */ -void output_set_term( wchar_t *term ); +void output_set_term( const wchar_t *term ); /** Return the terminal name */