mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
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:
parent
ffe87bc566
commit
dd49d07547
3 changed files with 16 additions and 9 deletions
10
src/error.c
10
src/error.c
|
|
@ -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]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue