mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 17:11:11 -09:00
GP-7292 fixed bug in FixedSizedIntegerTextField introduced in GP-3049
This commit is contained in:
@@ -110,6 +110,11 @@ public class FixedSizeIntegerTextField extends AbstractIntegerTextField {
|
|||||||
minSignedValue = BigInteger.TWO.pow(bitSize - 1).negate();
|
minSignedValue = BigInteger.TWO.pow(bitSize - 1).negate();
|
||||||
maxSignedValue = BigInteger.TWO.pow(bitSize - 1).subtract(BigInteger.ONE);
|
maxSignedValue = BigInteger.TWO.pow(bitSize - 1).subtract(BigInteger.ONE);
|
||||||
|
|
||||||
|
// special case for bitSize == 1, signed makes no sense, so use unsigned min/max for both
|
||||||
|
if (bitSize == 1) {
|
||||||
|
minSignedValue = minUnsignedValue;
|
||||||
|
maxSignedValue = maxUnsignedValue;
|
||||||
|
}
|
||||||
BigInteger value = getValue();
|
BigInteger value = getValue();
|
||||||
this.bitSize = bitSize;
|
this.bitSize = bitSize;
|
||||||
updateMinMax();
|
updateMinMax();
|
||||||
|
|||||||
Reference in New Issue
Block a user