Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/libnfc-nci/nfc/tags/rw_t2t_ndef.c
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ static void rw_t2t_handle_tlv_detect_rsp (UINT8 *p_data)
if (!found && !failed)
{

if (p_t2t->work_offset >= (p_t2t->tag_hdr[T2T_CC2_TMS_BYTE] * T2T_TMS_TAG_FACTOR))
if (p_t2t->work_offset >= (p_t2t->tag_hdr[T2T_CC2_TMS_BYTE] * T2T_TMS_TAG_FACTOR + T2T_FIRST_DATA_BLOCK * T2T_BLOCK_LEN))
{
if ( ((tlvtype == TAG_LOCK_CTRL_TLV) && (p_t2t->num_lockbytes > 0))
||((tlvtype == TAG_MEM_CTRL_TLV) && (p_t2t->num_mem_tlvs > 0)) )
Expand All @@ -794,7 +794,7 @@ static void rw_t2t_handle_tlv_detect_rsp (UINT8 *p_data)
}
else
{
if (rw_t2t_read ((UINT16) ((p_t2t->work_offset / T2T_BLOCK_LEN) + T2T_FIRST_DATA_BLOCK)) != NFC_STATUS_OK)
if (rw_t2t_read ((UINT16) (p_t2t->work_offset / T2T_BLOCK_LEN)) != NFC_STATUS_OK)
failed = TRUE;
}
}
Expand Down