@@ -1688,7 +1688,7 @@ bool HIDTryUnpack(wiegand_message_t *packed) {
16881688 );
16891689 }
16901690
1691- if (found_cnt > 0 ){
1691+ if (found_cnt > 0 ) {
16921692 if (packed -> Length && ((found_cnt - found_invalid_par ) == 0 )) { // if length > 0 and no valid parity matches
16931693 PrintAndLogEx (FAILED , "Parity tests failed" );
16941694 }
@@ -1718,23 +1718,23 @@ bool decode_wiegand(uint32_t top, uint32_t mid, uint32_t bot, int n) {
17181718 if (n > 0 ) {
17191719 wiegand_message_t packed = initialize_message_object (top , mid , bot , n );
17201720 res = HIDTryUnpack (& packed );
1721- } else if (n < 0 ) {
1721+ } else if (n < 0 ) {
17221722 PrintAndLogEx (INFO , "Brute forcing all possible lengths..." );
1723- int scan_end = (- n )* 4 ;
1724- int scan_start = scan_end - 3 ;
1723+ int scan_end = (- n ) * 4 ;
1724+ int scan_start = scan_end - 3 ;
17251725
17261726 wiegand_message_t packed = initialize_message_object (top , mid , bot , scan_end );
1727-
1727+
17281728 // find the first bit set in the first nibble
1729- for (int i = 0 ; i < 4 ; i ++ ) {
1729+ for (int i = 0 ; i < 4 ; i ++ ) {
17301730 if (get_bit_by_position (& packed , i ) == 1 ) {
1731- scan_start = scan_end - i ;
1731+ scan_start = scan_end - i ;
17321732 break ;
17331733 }
17341734 }
17351735
17361736 PrintAndLogEx (INFO , "Scanning from bit %d to %d..." , scan_start , scan_end );
1737- for (int i = scan_start ; i <= scan_end ; i ++ ) {
1737+ for (int i = scan_start ; i <= scan_end ; i ++ ) {
17381738 packed .Length = i ;
17391739 res |= HIDTryUnpack (& packed );
17401740 }
0 commit comments