FIX: GenerateFilename() return broken filename if no tag is detected.

This commit is contained in:
Brian Pow 2018-02-07 22:00:25 +08:00
commit 8e04df77ba

View file

@ -364,7 +364,8 @@ char * GenerateFilename(const char *prefix, const char *suffix){
int uidlen=0;
char * fptr = malloc (sizeof (char) * (strlen(prefix) + strlen(suffix)) + sizeof(uid)*2 + 1);
if (!GetHFMF14AUID(uid, &uidlen)) {
GetHFMF14AUID(uid, &uidlen);
if (!uidlen) {
PrintAndLog("No tag found.");
return NULL;
}