Fix bug in setting precomputed power-of-10
This commit is contained in:
@@ -26,7 +26,6 @@ static const uint8_t clzLookup[256] =
|
||||
};
|
||||
|
||||
|
||||
|
||||
static const uint16_t pow10Data[] =
|
||||
{
|
||||
0x0001, 0x000A, 0x0064, 0x2710, 0xE100, 0x05F5, 0x0000, 0x6FC1,
|
||||
@@ -62,7 +61,7 @@ static void pow10Set(int index,
|
||||
BH_Int1120 *out)
|
||||
{
|
||||
out->size = pow10Size[index];
|
||||
memcpy(out->digits, pow10Data + pow10Index[index], out->size);
|
||||
memcpy(out->digits, pow10Data + pow10Index[index], out->size * sizeof(uint16_t));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@ typedef struct BH_Int1120
|
||||
int BH_Int1120Clz(const uint16_t value);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Compares big integers \a a and \a b.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user