richterm

"terminal emulator" with support for text fonts and images for plan9
git clone git://nsmpr.xyz/richterm.git
Log | Files | Refs | README

commit fa6fa28972c3aeef5f0be25ed7ee2cb89cd0533d
parent 44388c854111dc4b8ca9d997b6a5028ae8d2587a
Author: Pavel Renev <an2qzavok@gmail.com>
Date:   Mon, 28 Mar 2022 14:57:02 +0000

fix non-empty empty links

Diffstat:
Mrichterm.c | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/richterm.c b/richterm.c @@ -715,12 +715,14 @@ parsedata(Array *data, Array *elems) case E_LINK: e = malloc(sizeof(Elem)); e->type = TLink; - e->str = strdup(buf->p + 1); + e->str = (buf->p[1] != '\0') ? + strdup(buf->p + 1) : nil; break; case E_FONT: e = malloc(sizeof(Elem)); e->type = TFont; - e->str = strdup(buf->p + 1); + e->str = (buf->p[1] != '\0') ? + strdup(buf->p + 1) : nil; break; }