From: Jim Meyering Date: Wed, 12 Feb 1997 16:31:01 +0000 (+0000) Subject: fixed off-by-one error X-Git-Tag: SH-UTILS-1_16a~248 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6bdbdae68cf04732179f81f3f61d1743d8f9749f;p=thirdparty%2Fcoreutils.git fixed off-by-one error --- diff --git a/src/tac.c b/src/tac.c index 77c68342ca..07fb085ee3 100644 --- a/src/tac.c +++ b/src/tac.c @@ -525,7 +525,7 @@ tac_mem (const char *buf, size_t n_bytes, FILE *out) { /* Output the line (which includes a trailing newline) from NL+1 to BOL-1. */ - fwrite (nl + 1, 1, bol - 1 - (nl + 1), out); + fwrite (nl + 1, 1, bol - (nl + 1), out); bol = nl + 1; }