git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix off-by-one error.
@ 2005-11-26  3:37 A Large Angry SCM
  0 siblings, 0 replies; 2+ messages in thread
From: A Large Angry SCM @ 2005-11-26  3:37 UTC (permalink / raw)
  To: Junio C Hamano, git


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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] Fix off-by-one error.
@ 2005-11-26  7:59 A Large Angry SCM
  0 siblings, 0 replies; 2+ messages in thread
From: A Large Angry SCM @ 2005-11-26  7:59 UTC (permalink / raw)
  To: Junio C Hamano, git


Signed-off-by: A Large Angry SCM <gitzilla@gmail.com>

---

Fixed the correct line and tested this time.

 name-rev.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

applies-to: 196314fa7461a36f09ad1bab9b76dd190ad1925d
0fdee45c794131cd4cc1a4914cc34ab90511d173
diff --git a/name-rev.c b/name-rev.c
index 817e36b..96a87d3 100644
--- a/name-rev.c
+++ b/name-rev.c
@@ -217,7 +217,7 @@ int main(int argc, char **argv)
 					if (!strcmp(name, "undefined"))
 						continue;
 
-					fwrite(p_start, p - p_start, 1, stdout);
+					fwrite(p_start, p - p_start + 1, 1, stdout);
 					fputc('(', stdout);
 					fputs(name, stdout);
 					fputc(')', stdout);
---
0.99.9.GIT

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-11-26  8:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-26  7:59 [PATCH] Fix off-by-one error A Large Angry SCM
  -- strict thread matches above, loose matches on Subject: below --
2005-11-26  3:37 A Large Angry SCM

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).