sfeed_curses

[fork] sfeed (atom feed) reader
Log | Files | Refs | README | LICENSE

commit 38e5b442519a7c5bc81e3f8f9c09cd084647608c
parent 098d7db19021c00437c35e8f203aa2b2e62ae215
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Mon,  3 Aug 2020 15:48:47 +0200

handle tparm() returning NULL

This is a regression in the ttywrite() rework. tputs() handled the NULL case by
printing "(null)" (which was also not correct, but didn't crash).

Noticed in the OpenBSD terminal and using "appmode()".

Diffstat:
Msfeed_curses.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/sfeed_curses.c b/sfeed_curses.c @@ -179,6 +179,8 @@ ttywritef(const char *fmt, ...) int ttywrite(const char *s) { + if (!s) + return 0; /* for tparm() returning NULL */ return write(1, s, strlen(s)); }