mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-26 16:22:06 +01:00
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:
parent
e4621df621
commit
cd15d7499d
1 changed files with 1 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue