git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Fix off-by-one error.

From
A Large Angry SCM <gitzilla@gmail.com>
Date
Nov 26, 2005, 03:37 UTC
Message-ID
<4387D87A.4000103@gmail.com>
Signed-off-by: A Large Angry SCM <gitzilla@gmail.com>
---
 name-rev.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

applies-to: 31b3c7eeb719c61a19922f3e8bf5abd46b49b5bb d689edabc1af589855047a16d3682dba8fd3f1e5

diff --git a/name-rev.c b/name-rev.c
index 817e36b..2a25958 100644
--- a/name-rev.c
+++ b/name-rev.c
@@ -227,7 +227,7 @@ int main(int argc, char **argv)
 
 			/* flush */
 			if (p_start != p)
-				fwrite(p_start, p - p_start, 1, stdout);
+				fwrite(p_start, p - p_start + 1, 1, stdout);
 		}
 	} else if (all) {
 		int i;
---
0.99.9.GIT
Message 1 of 1 in “Fix off-by-one error.”
  1. Fix off-by-one error.A Large Angry SCM, Nov 26, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.