mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-19 08:30:25 +02:00
Fixed operator precedence issues
This commit is contained in:
parent
d0c9145655
commit
2ac478509e
7 changed files with 16 additions and 10 deletions
|
@ -284,7 +284,10 @@ namespace System
|
|||
int32[] days = leapYear ? DaysToMonth366 : DaysToMonth365;
|
||||
// All months have less than 32 days, so n >> 5 is a good conservative
|
||||
// estimate for the month
|
||||
int32 m = n >> 5 + 1;
|
||||
|
||||
//BCF- Note, the original read `int32 m = n >> 5 + 1;`, which may have been a bug. Preserving original precedence.
|
||||
int32 m = n >> (5 + 1);
|
||||
|
||||
// m = 1-based month number
|
||||
while (n >= days[m]) m++;
|
||||
// If month was requested, return it
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue