- Fix the "Max" constant being incorrect for unsigned int types.

This commit is contained in:
Chronos Ouroboros 2021-01-06 15:50:58 -03:00
parent 7afae96530
commit d8164e0050

View file

@ -451,7 +451,7 @@ PInt::PInt(unsigned int size, bool unsign, bool compatible)
else
{
Symbols.AddSymbol(Create<PSymbolConstNumeric>(NAME_Min, this, 0u));
Symbols.AddSymbol(Create<PSymbolConstNumeric>(NAME_Max, this, (1u << ((8 * size) - 1))));
Symbols.AddSymbol(Create<PSymbolConstNumeric>(NAME_Max, this, (uint32_t) (((uint64_t) 1u << (size * 8)) - 1uL)));
}
SetOps();
}