summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.storage.dht
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit.storage.dht')
-rw-r--r--org.eclipse.jgit.storage.dht/src/org/eclipse/jgit/storage/dht/PackChunk.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/org.eclipse.jgit.storage.dht/src/org/eclipse/jgit/storage/dht/PackChunk.java b/org.eclipse.jgit.storage.dht/src/org/eclipse/jgit/storage/dht/PackChunk.java
index 66d3d3386b..57d357e4cf 100644
--- a/org.eclipse.jgit.storage.dht/src/org/eclipse/jgit/storage/dht/PackChunk.java
+++ b/org.eclipse.jgit.storage.dht/src/org/eclipse/jgit/storage/dht/PackChunk.java
@@ -349,7 +349,7 @@ public final class PackChunk {
int p = 1;
while ((c & 0x80) != 0) {
c = dataBuf[posPtr + p++] & 0xff;
- sz += (c & 0x7f) << shift;
+ sz += ((long) (c & 0x7f)) << shift;
shift += 7;
}
@@ -603,7 +603,7 @@ public final class PackChunk {
int shift = 4;
while ((c & 0x80) != 0) {
c = dataBuf[ptr++] & 0xff;
- sz += (c & 0x7f) << shift;
+ sz += ((long) (c & 0x7f)) << shift;
shift += 7;
}
@@ -650,7 +650,7 @@ public final class PackChunk {
int shift = 4;
while ((c & 0x80) != 0) {
c = dataBuf[ptr++] & 0xff;
- inflatedSize += (c & 0x7f) << shift;
+ inflatedSize += ((long) (c & 0x7f)) << shift;
shift += 7;
}