]> cvs.zerfleddert.de Git - proxmark3-svn/commitdiff
FIX: corrected one of my own bugs which made the calccrc8 not accept the input hexst...
authoriceman1001 <iceman@iuse.se>
Thu, 18 Feb 2016 16:46:11 +0000 (17:46 +0100)
committericeman1001 <iceman@iuse.se>
Thu, 18 Feb 2016 16:46:11 +0000 (17:46 +0100)
client/cmdhflegic.c

index ab9df4875f655d39e915e2e23dd016dfd035f61b..361efdc98a78ae47b07a0ee2953e42da2c20a3a6 100644 (file)
@@ -424,13 +424,13 @@ int CmdLegicRfFill(const char *Cmd) {
 int CmdLegicCalcCrc8(const char *Cmd){
 
        int len =  strlen(Cmd); 
-       if (len & 1 ) return usage_legic_calccrc8(); 
+       if ( len & 1 ) return usage_legic_calccrc8(); 
        
        // add 1 for null terminator.
        uint8_t *data = malloc(len+1);
        if ( data == NULL ) return 1;
                
-       if (!param_gethex(Cmd, 0, data, len )) return usage_legic_calccrc8(); 
+       if (param_gethex(Cmd, 0, data, len )) return usage_legic_calccrc8(); 
        
        uint32_t checksum =  CRC8Legic(data, len/2);    
        PrintAndLog("Bytes: %s || CRC8: %X", sprint_hex(data, len/2), checksum );
Impressum, Datenschutz