fix: uint cant be negative..

This commit is contained in:
iceman1001 2019-08-28 21:16:09 +02:00
parent ad3fe38b45
commit 8d9751ebe4

View file

@ -2129,9 +2129,11 @@ static int CmdT55xxChkPwds(const char *Cmd) {
uint16_t keycount = 0;
int res = loadFileDICTIONARY_safe(filename, (void**) &keyBlock, 4, &keycount);
if (res != PM3_SUCCESS || keycount <= 0 || keyBlock == NULL) {
if (res != PM3_SUCCESS || keycount == 0 || keyBlock == NULL) {
PrintAndLogEx(WARNING, "No keys found in file");
if (keyBlock != NULL) free(keyBlock);
if (keyBlock != NULL)
free(keyBlock);
return PM3_ESOFT;
}