Skip to content

Commit bddf179

Browse files
author
bogdan
committed
uint64 stringify tests
1 parent 32e8dfa commit bddf179

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/Util/UInt64String.php

+6-7
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,18 @@ function ___shiftRight($word, $bits)
5555
$m = -1 << (64 - $bits);
5656

5757
if ($bits >= 32)
58-
return static::___pack(-1, ($wordHi >> ($bits - 32)) | $m);
58+
return static::___pack(
59+
-1
60+
,
61+
//
62+
($wordHi >> ($bits - 32)) | $m);
5963
else
60-
{
61-
62-
$n = ~$m;
63-
6464
return static::___pack(
6565
($wordHi >> $bits) | (-1 << (32 - $bits))
6666
,
6767
//
68-
(($wordLo >> $bits & $n) |
68+
(($wordLo >> $bits & ($n = ~$m)) |
6969
($wordHi << (32 - $bits))) & $n);
70-
}
7170
}
7271

7372
}

0 commit comments

Comments
 (0)