From 6cf8fcb002d57d243cb2f13c0fae35212ae3641f Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 18 Feb 2016 17:46:11 +0100 Subject: [PATCH] FIX: corrected one of my own bugs which made the calccrc8 not accept the input hexstring. --- client/cmdhflegic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/cmdhflegic.c b/client/cmdhflegic.c index ab9df487..361efdc9 100644 --- a/client/cmdhflegic.c +++ b/client/cmdhflegic.c @@ -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 ); -- 2.39.2