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);
|
fprintf(stdout, "Using terminal type [%s]\n", term);
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_TERMINFO
|
#ifdef HAVE_TERMINFO
|
||||||
setupterm(NULL, 1, &i);
|
if (setupterm(NULL, 1, &i) == ERR)
|
||||||
if (i != 1)
|
|
||||||
{
|
{
|
||||||
fprintf(stderr, "setupterm failed: %d\n", i);
|
fprintf(stderr, "setupterm failed: %d\n", i);
|
||||||
fprintf(stderr, "So we'll be running in dumb mode...\n");
|
fprintf(stderr, "So we'll be running in dumb mode...\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user