Added a sanity fatal() to the SST Flash code.
This commit is contained in:
@@ -264,7 +264,8 @@ sst_39sf010_init(const device_t *info)
|
|||||||
|
|
||||||
f = nvr_fopen(flash_path, L"rb");
|
f = nvr_fopen(flash_path, L"rb");
|
||||||
if (f) {
|
if (f) {
|
||||||
fread(&(dev->array[0x00000]), 0x20000, 1, f);
|
if (fread(&(dev->array[0x00000]), 1, 0x20000, f) != 0x20000)
|
||||||
|
fatal("Less than 131072 bytes read from the SST Flash ROM file\n");
|
||||||
fclose(f);
|
fclose(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user