On Tuesday, 20 June 2017 at 01:58:22 UTC, Era Scarecrow wrote:
long t; //temporary, doubles as carry <snip> t >>= uint.sizeof*8;
To note, looking in compiler explorer (GDC 5.2.0), the following output is present (for the above line):
mov rax, QWORD PTR [rbp-24] shr rax, 32 mov QWORD PTR [rbp-24], rax'shr' is unsigned right shift, when it should be 'sar' signed right shift. That is my guess where the bug is.