commit 0a03e6dadf7c30cea1fb388a9e5386a00c853dbb
parent 174fbd5d09bc13212fc1edc0cd1d3fa2400a8b7e
Author: Eyal Sawady <ecs@d2evs.net>
Date: Wed, 23 Sep 2020 18:57:46 -0400
Fix a bug causing some text to be duplicated
For example:
$ gmnlm gemini://gemini.circumlunar.space
[...]
11) A lissper.strangled.net/mirrorlist/ A lisssources
t of mirrored services
[...]
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/src/parser.c b/src/parser.c
@@ -113,6 +113,7 @@ gemini_parser_next(struct gemini_parser *p, struct gemini_token *tok)
size_t len = end - p->buf + 1;
memmove(p->buf, end + 1, p->bufln - len);
p->bufln -= len;
+ p->buf[p->bufln] = 0;
} else {
p->buf[0] = 0;
p->bufln = 0;