diff options
Diffstat (limited to 'java')
-rw-r--r-- | java/org/brotli/wrapper/dec/BrotliDecoderChannel.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/java/org/brotli/wrapper/dec/BrotliDecoderChannel.java b/java/org/brotli/wrapper/dec/BrotliDecoderChannel.java index c9a752a..6dfe8f2 100644 --- a/java/org/brotli/wrapper/dec/BrotliDecoderChannel.java +++ b/java/org/brotli/wrapper/dec/BrotliDecoderChannel.java @@ -58,8 +58,8 @@ public class BrotliDecoderChannel extends Decoder implements ReadableByteChannel int result = 0; while (dst.hasRemaining()) { int outputSize = decode(); - if (outputSize == -1) { - return result == 0 ? -1 : result; + if (outputSize <= 0) { + return result == 0 ? outputSize : result; } result += consume(dst); } |