summaryrefslogtreecommitdiff
path: root/ch.c
diff options
context:
space:
mode:
Diffstat (limited to 'ch.c')
-rw-r--r--ch.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ch.c b/ch.c
index 636f68f007911..70fad1002dbfc 100644
--- a/ch.c
+++ b/ch.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 1984-2019 Mark Nudelman
+ * Copyright (C) 1984-2020 Mark Nudelman
*
* You may distribute under the terms of either the GNU General Public
* License or the Less License, as specified in the README file.
@@ -408,6 +408,7 @@ end_logfile(VOID_PARAM)
}
close(logfile);
logfile = -1;
+ free(namelogfile);
namelogfile = NULL;
}
@@ -842,7 +843,8 @@ seekable(f)
public void
ch_set_eof(VOID_PARAM)
{
- ch_fsize = ch_fpos;
+ if (ch_fsize != NULL_POSITION && ch_fsize < ch_fpos)
+ ch_fsize = ch_fpos;
}