make disk sizing errors non-fatal in hosted mode

it can be innocuous in the case that you're changing sizes
for debugging
This commit is contained in:
bunnie 2022-05-10 17:37:08 +08:00
parent 9419ed6078
commit 8af8926ad1

View file

@ -43,7 +43,9 @@ fn flashmem() -> &'static mut FlashSingleton {
} else {
match disk.read_to_end(&mut memory) {
Ok(bytes_read) => {
assert!(bytes_read == PDDB_A_LEN, "PDDB disk image is of an incorrect size, refusing to run!");
if bytes_read != PDDB_A_LEN {
log::warn!("PDDB disk image is of an incorrect size: got {}, expected {}", bytes_read, PDDB_A_LEN);
}
}
_ => {
panic!("Can't read PDDB disk image, refusing to run!");