Commit ad003763ccb39c0e59f5c1d8372a202541a9049e

Vicent Marti 2013-03-12T20:36:35

MSVC: What could possibly be the size of a void*?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/src/util.c b/src/util.c
index 102bbae..8859780 100644
--- a/src/util.c
+++ b/src/util.c
@@ -642,7 +642,8 @@ void git__insertsort_r(
 	void *els, size_t nel, size_t elsize, void *swapel,
 	git__sort_r_cmp cmp, void *payload)
 {
-	uint8_t *base = els, *end = els + nel * elsize;
+	uint8_t *base = els;
+	uint8_t *end = base + nel * elsize;
 	uint8_t *i, *j;
 	bool freeswap = !swapel;