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