mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-27 01:25:41 +08:00
Merge pull request #1343 from merlokk/asn1intfix
asn1_value_integer now works in pure hex to int instead of BCD
This commit is contained in:
commit
125c0a4124
1 changed files with 3 additions and 3 deletions
|
@ -197,14 +197,14 @@ static unsigned long asn1_value_integer(const struct tlv *tlv, unsigned start, u
|
|||
i = start;
|
||||
|
||||
for (; i < end - 1; i += 2) {
|
||||
ret *= 10;
|
||||
ret = ret << 4; // was: ret*=10
|
||||
ret += tlv->value[i / 2] >> 4;
|
||||
ret *= 10;
|
||||
ret = ret << 4; // was: ret*=10
|
||||
ret += tlv->value[i / 2] & 0xf;
|
||||
}
|
||||
|
||||
if (end & 1) {
|
||||
ret *= 10;
|
||||
ret = ret << 4; // was: ret*=10
|
||||
ret += tlv->value[end / 2] >> 4;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue