minor parsing issue

This commit is contained in:
iceman1001 committed 2024-03-19 11:11:33 +01:00
1 parent 59bc927698
commit d1d9d00d99
3 files changed
+738 -2

No files matched your search

+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;
}