fix for #90 ltc_ecc_mul2add.c integer sign issue (sjaeckel's way)

This commit is contained in:
Karel Miko 2016-01-15 08:56:32 +01:00
parent 0c226834cc
commit 979e9a9d15

View File

@ -134,13 +134,14 @@ int ltc_ecc_mul2add(ecc_point *A, void *kA,
bitbufB = tB[0];
/* for every byte of the multiplicands */
for (x = -1;; ) {
for (x = 0;; ) {
/* grab a nibble */
if (++nibble == 4) {
++x; if (x == len) break;
if (x == len) break;
bitbufA = tA[x];
bitbufB = tB[x];
nibble = 0;
++x;
}
/* extract two bits from both, shift/update */