mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-09 17:56:53 +08:00
Merge pull request #510 from merlokk/cur_tlv
fix `shadow variable` thanks @iceman1001 )
This commit is contained in:
commit
012d5ef5d5
1 changed files with 4 additions and 4 deletions
|
@ -32,14 +32,14 @@ static size_t dol_calculate_len(const struct tlv *tlv, size_t data_len) {
|
|||
size_t count = 0;
|
||||
|
||||
while (left) {
|
||||
struct tlv tlv;
|
||||
if (!tlv_parse_tl(&buf, &left, &tlv))
|
||||
struct tlv cur_tlv;
|
||||
if (!tlv_parse_tl(&buf, &left, &cur_tlv))
|
||||
return 0;
|
||||
|
||||
count += tlv.len;
|
||||
count += cur_tlv.len;
|
||||
|
||||
/* Last tag can be of variable length */
|
||||
if (tlv.len == 0 && left == 0)
|
||||
if (cur_tlv.len == 0 && left == 0)
|
||||
count = data_len;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue