We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
there is a bug, please check it. byte[] encode = PomeloPackage.encode(PomeloPackage.TYPE_DATA, bytes); in the function encode: public static byte[] encode(int type, byte[] body) { int length = body != null ? body.length : 0; byte[] buffer = new byte[PKG_HEAD_BYTES + length]; int index = 0; buffer[index++] = (byte) (type); buffer[index++] = (byte) ((length >> 16)); buffer[index++] = (byte) ((length >> 8)); buffer[index++] = (byte) (length); if (body != null) { for (byte i = 0; i < body.length; i++) { buffer[PKG_HEAD_BYTES + i] = (byte) body[i]; } } return buffer; }
body.length is bigger then 128, in for(...),i is a byte type ,so there is a Exception :java.lang.ArrayIndexOutOfBoundsException: -128
The text was updated successfully, but these errors were encountered:
hello Are you here?
Sorry, something went wrong.
thanks for your report
I will fix this issue soon
wtf!
what the heck!
No branches or pull requests
there is a bug, please check it.
byte[] encode = PomeloPackage.encode(PomeloPackage.TYPE_DATA, bytes);
in the function encode:
public static byte[] encode(int type, byte[] body) {
int length = body != null ? body.length : 0;
byte[] buffer = new byte[PKG_HEAD_BYTES + length];
int index = 0;
buffer[index++] = (byte) (type);
buffer[index++] = (byte) ((length >> 16));
buffer[index++] = (byte) ((length >> 8));
buffer[index++] = (byte) (length);
if (body != null) {
for (byte i = 0; i < body.length; i++) {
buffer[PKG_HEAD_BYTES + i] = (byte) body[i];
}
}
return buffer;
}
body.length is bigger then 128, in for(...),i is a byte type ,so there is a Exception :java.lang.ArrayIndexOutOfBoundsException: -128
The text was updated successfully, but these errors were encountered: