mirror of
https://github.com/PaperMC/Velocity.git
synced 2025-01-24 14:54:03 +08:00
Fix minor bug in JavaVelocityCipher
This commit is contained in:
parent
25773cd366
commit
466d06216d
@ -51,8 +51,9 @@ public class JavaVelocityCipher implements VelocityCipher {
|
||||
} else {
|
||||
// If the destination we write to is an array, we can use the backing array directly.
|
||||
destination.ensureWritable(outputSize);
|
||||
destination.writerIndex(cipher.update(asHeapBuf.array(), asHeapBuf.arrayOffset(), inBytes,
|
||||
destination.array(), destination.arrayOffset()));
|
||||
int produced = cipher.update(asHeapBuf.array(), asHeapBuf.arrayOffset(), inBytes,
|
||||
destination.array(), destination.arrayOffset());
|
||||
destination.writerIndex(destination.writerIndex() + produced);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user