Make Integer representation little endian
This commit is contained in:
@ -87,21 +87,20 @@ in
|
||||
}
|
||||
body
|
||||
{
|
||||
size_t i = y.length;
|
||||
size_t i;
|
||||
auto tmp1 = Integer(x, x.allocator);
|
||||
auto result = Integer(x.allocator);
|
||||
|
||||
if (x.length == 0 && i != 0)
|
||||
if (x.length == 0 && y.length != 0)
|
||||
{
|
||||
i = 0;
|
||||
i = y.length;
|
||||
}
|
||||
else
|
||||
{
|
||||
result = 1;
|
||||
}
|
||||
while (i)
|
||||
while (i < y.length)
|
||||
{
|
||||
--i;
|
||||
for (ubyte mask = 0x01; mask; mask <<= 1)
|
||||
{
|
||||
if (y.rep[i] & mask)
|
||||
@ -113,6 +112,7 @@ body
|
||||
tmp1 *= tmp2;
|
||||
tmp1 %= z;
|
||||
}
|
||||
++i;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
Reference in New Issue
Block a user