mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-26 01:48:10 -07:00
Merge remote-tracking branch 'ofw/dev' into mntm-dev
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
#define ISO14443_4_BLOCK_PCB_S_CID_MASK (1U << ISO14443_4_BLOCK_PCB_R_CID_OFFSET)
|
||||
#define ISO14443_4_BLOCK_PCB_S_WTX_DESELECT_MASK (3U << ISO14443_4_BLOCK_PCB_S_WTX_DESELECT_OFFSET)
|
||||
|
||||
#define ISO14443_4_BLOCK_PCB_BITS_ACTIVE(pcb, mask) (((pcb) & mask) == mask)
|
||||
#define ISO14443_4_BLOCK_PCB_BITS_ACTIVE(pcb, mask) (((pcb) & (mask)) == (mask))
|
||||
|
||||
#define ISO14443_4_BLOCK_PCB_IS_R_BLOCK(pcb) \
|
||||
ISO14443_4_BLOCK_PCB_BITS_ACTIVE(pcb, ISO14443_4_BLOCK_PCB_R_MASK)
|
||||
@@ -121,13 +121,6 @@ bool iso14443_4_layer_decode_block(
|
||||
|
||||
bool ret = false;
|
||||
|
||||
// TODO: Fix properly! this is a very big kostyl na velosipede
|
||||
// (bit_buffer_copy_right are called to copy bigger buffer into smaller buffer causing crash on furi check) issue comes iso14443_4a_poller_send_block at line 109
|
||||
// Mimicks furi_check()s in bit_buffer_copy_right(): buf=output_data other=block_data start_index=1
|
||||
if(!(bit_buffer_get_size_bytes(block_data) > 1)) return ret;
|
||||
if(!(bit_buffer_get_capacity_bytes(output_data) >= bit_buffer_get_size_bytes(block_data) - 1))
|
||||
return ret;
|
||||
|
||||
do {
|
||||
if(ISO14443_4_BLOCK_PCB_IS_R_BLOCK(instance->pcb_prev)) {
|
||||
const uint8_t response_pcb = iso14443_4_layer_get_response_pcb(block_data);
|
||||
|
||||
Reference in New Issue
Block a user