summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2022-04-19 20:55:14 -0400
committerJakob Kaivo <jkk@ung.org>2022-04-19 20:55:14 -0400
commitf8498ea2a1e6230aa7b92be784db070045d36255 (patch)
tree5fae693e889ca7875a7d8fcd598d01f566f3f7e5
parent5a5dbecec1723ec67357da4c174f600728933859 (diff)
finally fix the missing every other line of piped stdin
-rw-r--r--more.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/more.c b/more.c
index 6e941fc..aae4ad4 100644
--- a/more.c
+++ b/more.c
@@ -70,8 +70,8 @@ enum {
static ssize_t more_getline(struct more_file *mf, size_t lineno)
{
if (mf->nlines <= lineno && mf->nlines != 0) {
- fsetpos(mf->f, &(mf->tlines[mf->nlines - 1]));
- getline(&(mf->buf), &(mf->nbuf), mf->f);
+ fsetpos(mf->backing, &(mf->tlines[mf->nlines - 1]));
+ getline(&(mf->buf), &(mf->nbuf), mf->backing);
}
while (mf->nlines <= lineno) {