From 4b8d481927fc6425ca3b84c0498601221bd939eb Mon Sep 17 00:00:00 2001 From: Ruth Alkema Date: Wed, 11 Mar 2009 16:19:31 +0100 Subject: [PATCH] Fix 'negative position' error when reading from large pack files Signed-off-by: Ruth Alkema Signed-off-by: Shawn O. Pearce --- org.spearce.jgit/src/org/spearce/jgit/lib/WindowCache.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/WindowCache.java b/org.spearce.jgit/src/org/spearce/jgit/lib/WindowCache.java index 4b7e10dd..5340da9a 100644 --- a/org.spearce.jgit/src/org/spearce/jgit/lib/WindowCache.java +++ b/org.spearce.jgit/src/org/spearce/jgit/lib/WindowCache.java @@ -253,7 +253,7 @@ public class WindowCache { releaseMemory(); runClearedWindowQueue(); - wp.allocWindow(curs, id, id << windowSizeShift, wsz); + wp.allocWindow(curs, id, ((long) id) << windowSizeShift, wsz); final ByteWindow e = curs.window; e.chainNext = cache[idx]; cache[idx] = e; -- 2.11.4.GIT