Merge remote-tracking branch 'km/miko-setbit-fix' into develop
This closes #91
This commit is contained in:
commit
af70cb6a01
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
#ifdef LTC_DER
|
#ifdef LTC_DER
|
||||||
|
|
||||||
#define setbit(v, n) (v=((unsigned char)(v) | (1U << (unsigned char)(n))))
|
#define SETBIT(v, n) (v=((unsigned char)(v) | (1U << (unsigned char)(n))))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Store a BIT STRING
|
Store a BIT STRING
|
||||||
@ -87,7 +87,7 @@ int der_decode_raw_bit_string(const unsigned char *in, unsigned long inlen,
|
|||||||
/* decode/store the bits */
|
/* decode/store the bits */
|
||||||
for (y = 0; y < blen; y++) {
|
for (y = 0; y < blen; y++) {
|
||||||
if (in[x] & (1 << (7 - (y & 7)))) {
|
if (in[x] & (1 << (7 - (y & 7)))) {
|
||||||
setbit(out[y/8], 7-(y%8));
|
SETBIT(out[y/8], 7-(y%8));
|
||||||
}
|
}
|
||||||
if ((y & 7) == 7) {
|
if ((y & 7) == 7) {
|
||||||
++x;
|
++x;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user