Skip to content

Commit c595b6c

Browse files
committed
Get correct types to appease testme.sh
1 parent 7f8ce48 commit c595b6c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bn_mp_todecimal_fast.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ mp_err mp_todecimal_fast_rec(mp_int *number, mp_int *nL, mp_int *shiftL, mp_int
1111

1212
if (precalc_array_index < 0) {
1313
char *next_piece = calloc(4, sizeof(char));
14-
int s_s = left ? snprintf(next_piece, 4, "%u", mp_get_u32(number)) : snprintf(next_piece, 4, "%03u", mp_get_u32(number));
14+
int s_s = left ? snprintf(next_piece, 4, "%u", mp_get_i32(number)) : snprintf(next_piece, 4, "%03u", mp_get_i32(number));
1515
size_t r_s = strlen(*result);
1616
(*result) = realloc(*result, r_s + s_s + 2);
1717
strcat(*result, next_piece);
@@ -24,7 +24,7 @@ mp_err mp_todecimal_fast_rec(mp_int *number, mp_int *nL, mp_int *shiftL, mp_int
2424
if ((err = mp_mul(number, &mL[precalc_array_index], &q)) != MP_OKAY) {
2525
goto LBL_ERR;
2626
}
27-
if ((err = mp_div_2d(&q, mp_get_u32(&shiftL[precalc_array_index]), &q, NULL)) != MP_OKAY) {
27+
if ((err = mp_div_2d(&q, mp_get_i32(&shiftL[precalc_array_index]), &q, NULL)) != MP_OKAY) {
2828
goto LBL_ERR;
2929
}
3030

@@ -136,7 +136,7 @@ mp_err mp_todecimal_fast(mp_int *number, char **result) {
136136
if ((err = mp_mul(&M4, &n, &M4)) != MP_OKAY) {
137137
goto LBL_ERR;
138138
}
139-
if ((err = mp_div_2d(&M4, mp_get_ul(&shift) + 6, &M4, NULL)) != MP_OKAY) {
139+
if ((err = mp_div_2d(&M4, mp_get_l(&shift) + 6, &M4, NULL)) != MP_OKAY) {
140140
goto LBL_ERR;
141141
}
142142
if ((err = mp_mul_2(&M2, &M2)) != MP_OKAY) {

0 commit comments

Comments
 (0)