summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2022-08-14 19:56:49 +0200
committerBenBE <BenBE@geshi.org>2022-08-22 21:32:49 +0200
commit5aa207f9af6622583fd60edebaef1c3ed19ab91d (patch)
tree77efbebc0b6fe15d70911c99a9082b6e70bff867
parent584124c9f4032046b4ed4a3f16ec5ee97ab08c4b (diff)
Display failures from initscr
initscr(3) might fail, e.g. if the environment variable TERM is not set, and directly exit the program. Thus redirect stderr afterwards to not hide those potential fatal failure messages: Error opening terminal: unknown.
-rw-r--r--CRT.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/CRT.c b/CRT.c
index 8686b547..61bb2dd7 100644
--- a/CRT.c
+++ b/CRT.c
@@ -915,9 +915,8 @@ void CRT_setMouse(bool enabled) {
#endif
void CRT_init(const Settings* settings, bool allowUnicode) {
- redirectStderr();
-
initscr();
+ redirectStderr();
noecho();
CRT_crashSettings = settings;
CRT_delay = &(settings->delay);

© 2014-2024 Faster IT GmbH | imprint | privacy policy