Beef icon indicating copy to clipboard operation
Beef copied to clipboard

Wrong implicit cast of uint64 to uint32

Open jayrulez opened this issue 3 years ago • 0 comments

E.g.:

uint32 x = (1uL << 32) - 1;

The shift in the parentheses should probably be evaluated before the cast IMO.

This workaround works:

uint32 x = ((uint64)1uL << 32) - 1;

jayrulez avatar Sep 24 '22 01:09 jayrulez