Print words in the correct order, and tack on the MSB.

This commit is contained in:
Dag-Erling Smørgrav 2017-04-05 21:02:25 +02:00
parent 206c6ffc85
commit 5170c0bc41
1 changed files with 3 additions and 3 deletions

View File

@ -62,9 +62,9 @@ t_printv_mpi(const cryb_mpi *x)
{
t_printv("%c", x->neg ? '-' : '+');
t_printv("%08x", x->msb == 0 ? 0 : x->words[0]);
for (unsigned int i = 1; i < (x->msb + 31) / 32; ++i)
t_printv(" %08x", x->words[i]);
for (unsigned int i = (x->msb + 31) / 32; i > 0; --i)
t_printv(" %08x", x->words[i - 1]);
t_printv(" | %8i", x->msb);
}