@@ -704,11 +704,12 @@ static bool check_ro_lock_on_page(int block_num) {
704704 switch (m_tag_type ) {
705705 case TAG_TYPE_NTAG_213 :
706706 case TAG_TYPE_NTAG_215 :
707- case TAG_TYPE_NTAG_216 :
707+ case TAG_TYPE_NTAG_216 : {
708708 // pages can be locked or not independant of BL bits
709709 //the BL bits only freezes the lock bytes !
710710 uint16_t lock_bits = * (uint16_t * )& m_tag_information -> memory [2 ][2 ];
711711 return ((lock_bits >> block_num ) & 0x01 ) == 1 ;
712+ }
712713 default :
713714 // check block locking bits
714715 if (block_num <= 9 ) locked |= (m_tag_information -> memory [2 ][2 ] & 2 ) == 2 ;
@@ -813,8 +814,7 @@ static bool check_ro_lock_on_page(int block_num) {
813814 switch (m_tag_type ) {
814815 case TAG_TYPE_NTAG_213 :
815816 case TAG_TYPE_NTAG_215 :
816- case TAG_TYPE_NTAG_216 :
817- {
817+ case TAG_TYPE_NTAG_216 : {
818818 uint8_t block_bytes = m_tag_information -> memory [user_memory_end ][2 ];
819819 uint16_t block_world = 0 ;
820820
@@ -851,7 +851,7 @@ static int handle_write_command(uint8_t block_num, uint8_t *p_data) {
851851 switch (m_tag_type ) {
852852 case TAG_TYPE_NTAG_213 :
853853 case TAG_TYPE_NTAG_215 :
854- case TAG_TYPE_NTAG_216 :
854+ case TAG_TYPE_NTAG_216 : {
855855 int first_cfg_page = get_first_cfg_page_by_tag_type (m_tag_type );
856856 uint8_t cfglck = m_tag_information -> memory [first_cfg_page ][0 ] & 0x40 ;
857857 // For NTAG cards we need to check CFGLCK bit for config pages
@@ -860,6 +860,7 @@ static int handle_write_command(uint8_t block_num, uint8_t *p_data) {
860860 bool is_beyond_user_memory = (block_num >= block_max );
861861 out_of_bounds = (is_beyond_user_memory && !is_config_page ) || (config_locked && is_config_page );
862862 break ;
863+ }
863864 default :
864865 out_of_bounds = block_num >= block_max ;
865866 break ;
0 commit comments