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
java.lang.ArrayIndexOutOfBoundsException: Index -23 out of bounds for length 45
at nl.minvws.encoding.Base45$Encoder.encode(Base45.java:74) at nl.minvws.encoding.Base45$Encoder.encodeToString(Base45.java:98)
It is because in java bytes can be negative so the value ("see below") can be also negative
for (int i = 0; i < wholeChunkLength;) { int value = src[i++] * ByteSize + src[i++]; result[resultIndex++] = toBase45[value % BaseSize]; result[resultIndex++] = toBase45[value / BaseSize % BaseSize]; result[resultIndex++] = toBase45[value / (BaseSize * BaseSize) % BaseSize]; }
see
https://mkyong.com/java/java-convert-bytes-to-unsigned-bytes/
The text was updated successfully, but these errors were encountered:
No branches or pull requests
java.lang.ArrayIndexOutOfBoundsException: Index -23 out of bounds for length 45
It is because in java bytes can be negative so the value ("see below") can be also negative
see
https://mkyong.com/java/java-convert-bytes-to-unsigned-bytes/
The text was updated successfully, but these errors were encountered: