Fix a bug that caused nothing to be skipped when skipping exactly the
number of bytes present in a regular file was requested. Obtained from: OpenBSD
This commit is contained in:
parent
bc9b18cea2
commit
d4f3e58ebf
@ -374,7 +374,7 @@ doskip(const char *fname, int statok)
|
||||
if (statok) {
|
||||
if (fstat(fileno(stdin), &sb))
|
||||
err(1, "%s", fname);
|
||||
if (S_ISREG(sb.st_mode) && skip >= sb.st_size) {
|
||||
if (S_ISREG(sb.st_mode) && skip > sb.st_size) {
|
||||
address += sb.st_size;
|
||||
skip -= sb.st_size;
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user