Fix erroneous cast from byte to int in IBBInputStream's read()

method. The casted value needs to be masked with 0xff, because bytes
in java are signed (two's complement)

Fixes SMACK-394

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13387 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Florian Schmaus 2013-01-05 12:53:45 +00:00 committed by flow
parent e4621df621
commit cd15d7499d
1 changed files with 1 additions and 1 deletions

View File

@ -287,7 +287,7 @@ public class InBandBytestreamSession implements BytestreamSession {
}
// return byte and increment buffer pointer
return (int) buffer[bufferPointer++];
return ((int) buffer[bufferPointer++]) & 0xff;
}
public synchronized int read(byte[] b, int off, int len) throws IOException {