minor parsing issue

This commit is contained in:
iceman1001
2024-03-19 11:11:33 +01:00
parent 59bc927698
commit d1d9d00d99
3 changed files with 738 additions and 2 deletions
+5 -1
View File
@@ -468,7 +468,11 @@ static int CmdFlashMemInfo(const char *Cmd) {
// shall_write = arg_get_lit(ctx, 5);
CLIParserFree(ctx);
if (res || (dlen > 0 && dlen < sizeof(id))) {
if (res) {
return PM3_EINVARG;
}
if (dlen > 0 && dlen < sizeof(id)) {
PrintAndLogEx(FAILED, "Error parsing flash memory id, expect 8, got %d", dlen);
return PM3_EINVARG;
}