Skip to content

Commit 44b8590

Browse files
committed
bugfix unindexed singleton arrays
1 parent a1561c6 commit 44b8590

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/arangodb/velocypack/VPackBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1017,7 +1017,7 @@ private boolean closeCompactArrayOrObject(final int tos, final boolean isArray,
10171017
// 8 bytes long
10181018
buffer[tos] = (byte) (isArray ? 0x13 : 0x14);
10191019
final int targetPos = (int) (1 + bLen);
1020-
if (size - 1 > (tos + 9)) {
1020+
if (size - 1 >= (tos + 9)) {
10211021
for (int i = tos + targetPos; i < tos + 9; i++) {
10221022
remove(tos + targetPos);
10231023
}

0 commit comments

Comments
 (0)