diff options
author | Johan 't Hart <johanthart@gmail.com> | 2011-06-07 22:09:22 +0200 |
---|---|---|
committer | Johan 't Hart <johanthart@gmail.com> | 2011-06-17 23:58:34 +0200 |
commit | f0619886672be97bf574897989b9840557d15ecd (patch) | |
tree | c1eba0ec68038ebe3046372f99676025a00cb26a | |
parent | c716b1878e33d8cecf33e4c2a7b48d51bc88f95e (diff) | |
download | libgit2-f0619886672be97bf574897989b9840557d15ecd.tar.gz |
Fix compilation error in MSVC when compiling for c++
-rw-r--r-- | src/util.h | 2 |
1 files changed, 1 insertions, 1 deletions
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"); |