Make sure setupterm() returns ERR before examining the status value.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@252 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
@@ -842,8 +842,7 @@ int term_init (char *term)
|
||||
fprintf(stdout, "Using terminal type [%s]\n", term);
|
||||
#endif
|
||||
#ifdef HAVE_TERMINFO
|
||||
setupterm(NULL, 1, &i);
|
||||
if (i != 1)
|
||||
if (setupterm(NULL, 1, &i) == ERR)
|
||||
{
|
||||
fprintf(stderr, "setupterm failed: %d\n", i);
|
||||
fprintf(stderr, "So we'll be running in dumb mode...\n");
|
||||
|
||||
Reference in New Issue
Block a user