main: SPI mode without board: check file_size (must be > 0)
This commit is contained in:
parent
dd3204a6e0
commit
e3e93a394e
|
|
@ -380,7 +380,10 @@ int main(int argc, char **argv)
|
|||
|
||||
delete bit;
|
||||
} else if (args.prg_type == Device::RD_FLASH) {
|
||||
flash.dump(args.bit_file, args.offset, args.file_size);
|
||||
if (args.file_size == 0)
|
||||
printError("Error: 0 size for dump");
|
||||
else
|
||||
flash.dump(args.bit_file, args.offset, args.file_size);
|
||||
}
|
||||
|
||||
if (args.unprotect_flash && args.bit_file.empty())
|
||||
|
|
|
|||
Loading…
Reference in New Issue