Skip to content

Commit

Permalink
classlib: fix TByte.decode() value range check (#986)
Browse files Browse the repository at this point in the history
  • Loading branch information
vonZeppelin authored Dec 15, 2024
1 parent 98c78a8 commit 9489f2c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public static TByte valueOf(String s) throws TNumberFormatException {

public static TByte decode(String nm) throws TNumberFormatException {
TInteger value = TInteger.decode(nm);
if (value.intValue() < MIN_VALUE || value.intValue() >= MAX_VALUE) {
if (value.intValue() < MIN_VALUE || value.intValue() > MAX_VALUE) {
throw new TNumberFormatException();
}
return TByte.valueOf((byte) value.intValue());
Expand Down

0 comments on commit 9489f2c

Please sign in to comment.