geforkt von Mirrors/Velocity
Fix minor bug in JavaVelocityCipher
Dieser Commit ist enthalten in:
Ursprung
25773cd366
Commit
466d06216d
@ -51,8 +51,9 @@ public class JavaVelocityCipher implements VelocityCipher {
|
|||||||
} else {
|
} else {
|
||||||
// If the destination we write to is an array, we can use the backing array directly.
|
// If the destination we write to is an array, we can use the backing array directly.
|
||||||
destination.ensureWritable(outputSize);
|
destination.ensureWritable(outputSize);
|
||||||
destination.writerIndex(cipher.update(asHeapBuf.array(), asHeapBuf.arrayOffset(), inBytes,
|
int produced = cipher.update(asHeapBuf.array(), asHeapBuf.arrayOffset(), inBytes,
|
||||||
destination.array(), destination.arrayOffset()));
|
destination.array(), destination.arrayOffset());
|
||||||
|
destination.writerIndex(destination.writerIndex() + produced);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren