diff mercurial/thirdparty/xdiff/xdiffi.c @ 36929: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 e5b14f5b8b94
children
line wrap: on
line diff
--- a/mercurial/thirdparty/xdiff/xdiffi.c	Thu Mar 08 22:23:02 2018 +0900
+++ b/mercurial/thirdparty/xdiff/xdiffi.c	Mon Mar 12 21:50:18 2018 -0400
@@ -342,7 +342,7 @@
 	 * One is to store the forward path and one to store the backward path.
 	 */
 	ndiags = xe->xdf1.nreff + xe->xdf2.nreff + 3;
-	if (!(kvd = (int64_t *) xdl_malloc((2 * ndiags + 2) * sizeof(long)))) {
+	if (!(kvd = (int64_t *) xdl_malloc((2 * ndiags + 2) * sizeof(int64_t)))) {
 
 		xdl_free_env(xe);
 		return -1;