git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] unquote_c_style: fix off-by-one.
@ 2008-03-06 21:28 Pierre Habouzit
  2008-03-06 22:10 ` Junio C Hamano
  0 siblings, 1 reply; 5+ messages in thread
From: Pierre Habouzit @ 2008-03-06 21:28 UTC (permalink / raw)
  To: Git ML

Thanks to Adeodato Simò for having caught this.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
---
 quote.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/quote.c b/quote.c
index d061626..40702f6 100644
--- a/quote.c
+++ b/quote.c
@@ -288,7 +288,7 @@ int unquote_c_style(struct strbuf *sb, const char *quoted, const char **endp)
 		switch (*quoted++) {
 		  case '"':
 			if (endp)
-				*endp = quoted + 1;
+				*endp = quoted;
 			return 0;
 		  case '\\':
 			break;
-- 
1.5.4.3.593.g07854

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

end of thread, other threads:[~2008-03-07 21:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-06 21:28 [PATCH] unquote_c_style: fix off-by-one Pierre Habouzit
2008-03-06 22:10 ` Junio C Hamano
2008-03-07  0:44   ` Pierre Habouzit
2008-03-07  9:25     ` Adeodato Simó
2008-03-07 21:28       ` Junio C Hamano

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).