mirror of
https://github.com/reactos/reactos.git
synced 2025-01-06 06:20:13 +00:00
[FAST486]
The number of bit places in a shift operation is ANDed by the width of the type when it is in a register, so (1 << c), when c is 32, is actually 1, and not 0. Fix the calculation of MaxValue by using SignFlag | (SignFlag - 1) instead. svn path=/branches/ntvdm/; revision=60912
This commit is contained in:
parent
e62c987917
commit
fda5745543
1 changed files with 1 additions and 1 deletions
|
@ -43,7 +43,7 @@ Fast486ArithmeticOperation(PFAST486_STATE State,
|
|||
{
|
||||
ULONG Result;
|
||||
ULONG SignFlag = 1 << (Bits - 1);
|
||||
ULONG MaxValue = (1 << Bits) - 1;
|
||||
ULONG MaxValue = (SignFlag - 1) | SignFlag;
|
||||
|
||||
/* Make sure the values don't exceed the maximum for their size */
|
||||
FirstValue &= MaxValue;
|
||||
|
|
Loading…
Reference in a new issue