Consider writerIndex when LzfDecoder writes into a new heap buffer

Motivation:

Now LzfDecoder do not consider writerIndex when it writes into array of a new heap buffer (when it decodes a compressed chuck of data)
This commit is contained in:
Idel Pivnitskiy 2014-08-06 00:34:35 +04:00 committed by Norman Maurer
parent 8fce6316ad
commit 073ec8d10a

View File

@ -147,7 +147,7 @@ public class LzfDecoder extends ByteToMessageDecoder {
ByteBuf uncompressed = ctx.alloc().heapBuffer(originalLength, originalLength);
final byte[] outputArray = uncompressed.array();
final int outPos = uncompressed.arrayOffset();
final int outPos = uncompressed.arrayOffset() + uncompressed.writerIndex();
boolean success = false;
try {