mirror of
https://git.sr.ht/~sircmpwn/gmni
synced 2024-06-02 14:16:03 +02:00
fix missing last line in gmnlm in some cases
closes ~sircmpwn/gmni#64
This commit is contained in:
parent
1a9aa3e252
commit
17a27041c0
|
@ -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);
|
int n = p->read(p->state, &p->buf[p->bufln], p->bufsz - p->bufln - 1);
|
||||||
if (n == -1) {
|
if (n < 1) {
|
||||||
return -1;
|
|
||||||
} else if (n == 0) {
|
|
||||||
eof = p->bufln == 0;
|
eof = p->bufln == 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue