diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2023-12-10 20:54:33 +0100 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2023-12-10 21:05:54 +0100 |
commit | 147a1c19c1f7bfe8d0939618d3c8dc2bb4e59fb7 (patch) | |
tree | 59068e90abb014e29901f7bcf91be2a8b08f79ef /jgvariant-ostree/src/main/java/eu | |
parent | df853ef46a9c12d319bf824ac106a411f5eddabd (diff) |
Add more property-based tests and fix more bugs.
Change-Id: I8deb1a7d75078c037714541d8f6f656052c2476c
Diffstat (limited to 'jgvariant-ostree/src/main/java/eu')
-rw-r--r-- | jgvariant-ostree/src/main/java/eu/mulk/jgvariant/ostree/DeltaOperation.java | 4 |
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); } } |