gmni

a gemini line mode client
git clone https://git.clttr.info/gmni.git
Log (Feed) | Files | Refs (Tags) | README | LICENSE

commit 17a27041c0dd532c4df2932da1fbb95b4db7e544
parent 1a9aa3e252e93098505e00636e4a81234dfbcb25
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; }