Skip to content

Commit cdbdeed

Browse files
committed
removed the corect preprocessor branch in mp_to_unsigend_bin this time and removed 8-bit tests from testme.sh
1 parent b404756 commit cdbdeed

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

bn_mp_to_unsigned_bin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ mp_err mp_to_unsigned_bin(const mp_int *a, unsigned char *b)
1616

1717
x = 0;
1818
while (!MP_IS_ZERO(&t)) {
19-
b[x++] = (unsigned char)(t.dp[0] | ((t.dp[1] & 1u) << 7));
19+
b[x++] = (unsigned char)(t.dp[0] & 255u);
2020
if ((err = mp_div_2d(&t, 8, &t, NULL)) != MP_OKAY) {
2121
goto LBL_ERR;
2222
}

testme.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,13 +378,11 @@ do
378378
then
379379
_runvalgrind "$i $a" "$CFLAGS"
380380
[ "$WITH_LOW_MP" != "1" ] && continue
381-
_runvalgrind "$i $a" "-DMP_8BIT $CFLAGS"
382381
_runvalgrind "$i $a" "-DMP_16BIT $CFLAGS"
383382
_runvalgrind "$i $a" "-DMP_32BIT $CFLAGS"
384383
else
385384
_runtest "$i $a" "$CFLAGS"
386385
[ "$WITH_LOW_MP" != "1" ] && continue
387-
_runtest "$i $a" "-DMP_8BIT $CFLAGS"
388386
_runtest "$i $a" "-DMP_16BIT $CFLAGS"
389387
_runtest "$i $a" "-DMP_32BIT $CFLAGS"
390388
fi

0 commit comments

Comments
 (0)