fix signed byte bug in read() reported by Joe Soroka
[org.ibex.crypto.git] / src / org / ibex / net / SSL.java
index f53a1ae..0f15b28 100644 (file)
@@ -942,7 +942,7 @@ public class SSL extends Socket {
                 if(negotiated==0) return rawIS.read();
                 if(pendingLength > 0) {
                     pendingLength--;
-                    return pending[pendingStart++];
+                    return pending[pendingStart++]&0xff;
                 } else {
                     byte[] buf = new byte[1];
                     int n = read(buf);