\r
if (len > FILE_PATH_SIZE) len = FILE_PATH_SIZE;\r
\r
- fnameptr += len;\r
+ fnameptr += len-4;\r
\r
sprintf(fnameptr, ".eml"); \r
\r
\r
if (fgets(buf, sizeof(buf), f) == NULL) {\r
PrintAndLog("File reading error.");\r
+ fclose(f);\r
return 2;\r
}\r
\r
if(strlen(buf) && feof(f))\r
break;\r
PrintAndLog("File content error. Block data must include 32 HEX symbols");\r
+ fclose(f);\r
return 2;\r
}\r
for (i = 0; i < 32; i += 2)\r