Commit deee4766a88a89cc4c77543c02bde93ba03e8d7c

Vicent Martí 2011-06-17T15:44:26

Merge pull request #267 from Jopie64/development Fix compilation error in MSVC when compiling for c++

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/util.h b/src/util.h
index 72e3a9c..c81dd78 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");