aboutsummaryrefslogtreecommitdiff
path: root/jgvariant-ostree/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'jgvariant-ostree/src/main/java')
-rw-r--r--jgvariant-ostree/src/main/java/eu/mulk/jgvariant/ostree/DeltaOperation.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/jgvariant-ostree/src/main/java/eu/mulk/jgvariant/ostree/DeltaOperation.java b/jgvariant-ostree/src/main/java/eu/mulk/jgvariant/ostree/DeltaOperation.java
index 42b7056..bb31e50 100644
--- a/jgvariant-ostree/src/main/java/eu/mulk/jgvariant/ostree/DeltaOperation.java
+++ b/jgvariant-ostree/src/main/java/eu/mulk/jgvariant/ostree/DeltaOperation.java
@@ -130,6 +130,7 @@ public sealed interface DeltaOperation {
* @see #readVarint64
*/
private static void writeVarint64(ByteArrayOutputStream output, long value) {
+ int n = 0;
do {
byte b = (byte) (value & 0x7F);
value >>= 7;
@@ -137,6 +138,7 @@ public sealed interface DeltaOperation {
b |= (byte) 0x80;
}
output.write(b);
- } while (value != 0);
+ ++n;
+ } while (value != 0 && n < 10);
}
}