mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-20 08:58:00 +02:00
Fixed operator precedence issues
This commit is contained in:
parent
d0c9145655
commit
2ac478509e
7 changed files with 16 additions and 10 deletions
|
@ -220,7 +220,8 @@ namespace System.Globalization {
|
|||
int[] days = leapYear? DaysToMonth366: DaysToMonth365;
|
||||
// All months have less than 32 days, so n >> 5 is a good conservative
|
||||
// estimate for the month
|
||||
int m = n >> 5 + 1;
|
||||
//BCF- Note, the original read `int32 m = n >> 5 + 1;`, which may have been a bug. Preserving original precedence.
|
||||
int 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