Add detection of incorrect usage to git__joinpath()

This commit is contained in:
nulltoken 2011-03-19 08:31:40 +01:00 committed by Vicent Marti
parent f428ae615b
commit 2b861d7589

View File

@ -223,6 +223,9 @@ void git__joinpath_n(char *buffer_out, int count, ...)
int len;
path = va_arg(ap, const char *);
assert((i == 0) || path != buffer_start);
if (i > 0 && *path == '/' && buffer_out > buffer_start && buffer_out[-1] == '/')
path++;