summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cd2b8ae)
raw | patch | inline | side by side (parent: cd2b8ae)
author | Thomas Rast <trast@student.ethz.ch> | |
Mon, 29 Aug 2011 20:06:04 +0000 (22:06 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 29 Aug 2011 22:23:22 +0000 (15:23 -0700) |
convert_to_git sets src=dst->buf if any of the preceding conversions
actually did any work. Thus in ident_to_git we have to use memmove
instead of memcpy as far as src->dst copying is concerned.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
actually did any work. Thus in ident_to_git we have to use memmove
instead of memcpy as far as src->dst copying is concerned.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
convert.c | patch | blob | history |
diff --git a/convert.c b/convert.c
index efc7e07d475c66f7835dc6cbbd3bc358f01c41c3..893b105adbe843371ca16492ae14cd1b297dec7d 100644 (file)
--- a/convert.c
+++ b/convert.c
dollar = memchr(src, '$', len);
if (!dollar)
break;
- memcpy(dst, src, dollar + 1 - src);
+ memmove(dst, src, dollar + 1 - src);
dst += dollar + 1 - src;
len -= dollar + 1 - src;
src = dollar + 1;
src = dollar + 1;
}
}
- memcpy(dst, src, len);
+ memmove(dst, src, len);
strbuf_setlen(buf, dst + len - buf->buf);
return 1;
}