make sure variable are set before being used
This commit is contained in:
1 parent
e5293f1389
commit
af6fdd09e2
1 file changed
+7
@@ -108,6 +108,8 @@ static void em410x_construct_emul_graph(uint8_t *uid, uint8_t clock, uint8_t gap
|
|||||||
// print 64 bit EM410x ID in multiple formats
|
// print 64 bit EM410x ID in multiple formats
|
||||||
void printEM410x(uint32_t hi, uint64_t id, bool verbose, int type) {
|
void printEM410x(uint32_t hi, uint64_t id, bool verbose, int type) {
|
||||||
|
|
||||||
|
if (!id && !hi) return;
|
||||||
|
|
||||||
if (verbose == false) {
|
if (verbose == false) {
|
||||||
if (type & 0x1) { // Short ID
|
if (type & 0x1) { // Short ID
|
||||||
PrintAndLogEx(SUCCESS, "EM 410x ID "_GREEN_("%010" PRIX64), id);
|
PrintAndLogEx(SUCCESS, "EM 410x ID "_GREEN_("%010" PRIX64), id);
|
||||||
@@ -252,6 +254,11 @@ static int ask_em410x_binary_decode(bool verbose, uint32_t *hi, uint64_t *lo, ui
|
|||||||
return PM3_ESOFT;
|
return PM3_ESOFT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!lo && !hi) {
|
||||||
|
PrintAndLogEx(DEBUG, "DEBUG: Error - Em410x decoded to all zeros");
|
||||||
|
return PM3_ESOFT;
|
||||||
|
}
|
||||||
|
|
||||||
PrintAndLogEx(DEBUG, "DEBUG: Em410x idx: %zu, Len: %zu, Printing DemodBuffer:", *idx, *size);
|
PrintAndLogEx(DEBUG, "DEBUG: Em410x idx: %zu, Len: %zu, Printing DemodBuffer:", *idx, *size);
|
||||||
if (g_debugMode) {
|
if (g_debugMode) {
|
||||||
printDemodBuff(0, false, false, true);
|
printDemodBuff(0, false, false, true);
|
||||||
|
|||||||
Reference in new issue
Block a user