Fixed error printing for no autoconnect mode

Always print errors but only print silent errors when in no autoconnect
mode.
This commit is contained in:
Martin Lund 2016-05-18 21:28:08 +02:00
parent ffe87bc566
commit dd49d07547
3 changed files with 16 additions and 9 deletions

View file

@ -27,10 +27,14 @@
#include "tio/print.h"
#include "tio/error.h"
char error[1000];
char error[2][1000];
void error_exit(void)
{
if ((error[0] != 0) && (option.no_autoconnect))
printf("\rError: %s\r\n", error);
/* Always print errors but only print silent errors when in no autoconnect
* mode */
if (error[0][0] != 0)
printf("\rError: %s\r\n", error[0]);
else if ((error[1][0] != 0) && (option.no_autoconnect))
printf("\rError: %s\r\n", error[1]);
}