cgmnlm

colorful gemini line mode browser
git clone https://git.clttr.info/cgmnlm.git
Log (Feed) | Files | Refs (Tags) | README | LICENSE

commit 53a1f61fba4853220db28178a83ce41747058a2c
parent 6029d6a8464d26d0b9e314dc1beecca799df8d6a
Author: René Wagner <rwagner@rw-net.de>
Date:   Fri, 29 Oct 2021 12:47:37 +0200

fix missing last line in gmnlm in some cases

closes ~sircmpwn/gmni#64

Diffstat:
Msrc/parser.c | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/parser.c b/src/parser.c @@ -44,9 +44,7 @@ gemini_parser_next(struct gemini_parser *p, struct gemini_token *tok) } int n = p->read(p->state, &p->buf[p->bufln], p->bufsz - p->bufln - 1); - if (n == -1) { - return -1; - } else if (n == 0) { + if (n < 1) { eof = p->bufln == 0; break; }