From f0619886672be97bf574897989b9840557d15ecd Mon Sep 17 00:00:00 2001 From: Johan 't Hart Date: Tue, 7 Jun 2011 22:09:22 +0200 Subject: [PATCH] Fix compilation error in MSVC when compiling for c++ --- src/util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.h b/src/util.h index 72e3a9c68..c81dd7897 100644 --- a/src/util.h +++ b/src/util.h @@ -43,7 +43,7 @@ GIT_INLINE(char *) git__strndup(const char *str, size_t n) if (n < length) length = n; - ptr = malloc(length + 1); + ptr = (char*)malloc(length + 1); if (!ptr) git__throw(GIT_ENOMEM, "Out of memory. Failed to duplicate string");