]> source.dussan.org Git - tigervnc.git/commitdiff
corrected missing index ptr in new ZlibInStream implementation
authorBrian Hinz <bphinz@users.sourceforge.net>
Fri, 17 Jun 2011 20:46:08 +0000 (20:46 +0000)
committerBrian Hinz <bphinz@users.sourceforge.net>
Fri, 17 Jun 2011 20:46:08 +0000 (20:46 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4507 3789f03b-4d11-0410-bbf8-ca57d06f2519

java/src/com/tigervnc/rdr/ZlibInStream.java

index 439ddfe2e6c9837122600ea0a4a39a184391b696..62c45bd8260817807e82cf220be8f15ed37fe49b 100644 (file)
@@ -33,6 +33,7 @@ public class ZlibInStream extends InStream {
     b = new byte[bufSize];
     bytesIn = offset = 0;
     zs = new ZStream();
+    zs.next_in = null;
     zs.next_in_index = 0;
     zs.avail_in = 0;
     if (zs.inflateInit() != JZlib.Z_OK) {
@@ -112,6 +113,7 @@ public class ZlibInStream extends InStream {
     int n = underlying.check(1, 1, wait);
     if (n == 0) return false;
     zs.next_in = underlying.getbuf();
+    zs.next_in_index = underlying.getptr();
     zs.avail_in = underlying.getend() - underlying.getptr();
     if (zs.avail_in > bytesIn)
       zs.avail_in = bytesIn;