- /* zero carry */
- u = 0;
- for (ix = 0; ix < pa; ix++) {
- /* compute product and carry sum for this term */
- r = ((mp_word) u) + ((mp_word) * tmpa++) * ((mp_word) b);
+ /* compute columns */
+ for (ix = 0; ix < a->used; ix++) {
+ /* compute product and carry sum for this term */
+ r = ((mp_word) u) + ((mp_word)*tmpa++) * ((mp_word)b);