diff mercurial/thirdparty/xdiff/xprepare.c @ 36923:d40b9e29c114

xdiff: fix a hard crash on Windows The xdiff case of test-diff-antipatience.t started crashing in the C extension with 882657a9f768 (with 6a71a5ba666b backported so it compiles). There are a few more instances of 'long', but this resolves the crashing.
author Matt Harbison <matt_harbison@yahoo.com>
date Mon, 12 Mar 2018 21:50:18 -0400
parents 651c80720eed
children
line wrap: on
line diff
--- a/mercurial/thirdparty/xdiff/xprepare.c	Thu Mar 08 22:23:02 2018 +0900
+++ b/mercurial/thirdparty/xdiff/xprepare.c	Mon Mar 12 21:50:18 2018 -0400
@@ -296,9 +296,9 @@
 		goto abort;
 	memset(rchg, 0, (nrec + 2) * sizeof(char));
 
-	if (!(rindex = (int64_t *) xdl_malloc((nrec + 1) * sizeof(long))))
+	if (!(rindex = (int64_t *) xdl_malloc((nrec + 1) * sizeof(int64_t))))
 		goto abort;
-	if (!(ha = (uint64_t *) xdl_malloc((nrec + 1) * sizeof(unsigned long))))
+	if (!(ha = (uint64_t *) xdl_malloc((nrec + 1) * sizeof(uint64_t))))
 		goto abort;
 
 	xdf->nrec = nrec;