Restore part of my fix spammed in v1.23:
fseeko(file_size, SEEK_SET) -> fseek(0L, SEEK_END) 1) File may grows between operations, so fseeko to file_size may miss 2) 0L, SEEK_END is the same code using in tail in all other places
This commit is contained in:
parent
1649c0b338
commit
462da59fb1
@ -302,7 +302,7 @@ rlines(fp, off, sbp)
|
||||
}
|
||||
|
||||
/* Set the file pointer to reflect the length displayed. */
|
||||
if (fseeko(fp, sbp->st_size, SEEK_SET) == -1) {
|
||||
if (fseek(fp, 0L, SEEK_END) == -1) {
|
||||
ierr();
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user