From 675b9c1f42077d0042772aaca3833ca66bf2735e Mon Sep 17 00:00:00 2001 From: TomAwezome Date: Fri, 1 Apr 2022 13:01:22 -0400 Subject: [PATCH] Fix AHCIBootDVDProbeAll buffer read error try catch. --- src/Kernel/BlkDev/DiskAHCI.ZC | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Kernel/BlkDev/DiskAHCI.ZC b/src/Kernel/BlkDev/DiskAHCI.ZC index 8631efaf..fa9be7f1 100755 --- a/src/Kernel/BlkDev/DiskAHCI.ZC +++ b/src/Kernel/BlkDev/DiskAHCI.ZC @@ -1153,23 +1153,23 @@ Bool AHCIBootDVDProbeAll(CBlkDev *bd) AHCIPortInit(bd, port, i); AHCIAtapiBlksRead(bd, buf, sys_boot_blk, 1, FALSE); + + kernel = buf + sys_boot_src.u16[1] << BLK_SIZE_BITS; + + if (kernel->compile_time == sys_compile_time) + { + "AHCI: Found sys_compile_time at BLK %d on Port %d\n", sys_boot_blk, i; + "______________________\n"; + return TRUE; + } + else + "AHCI: Did not find matching sys_compile_time on Port %d\n", i; } catch { Fs->catch_except = TRUE; - "AHCI: Error at Port %d", i; + "AHCI: Error at Port %d\n", i; } - - kernel = buf + sys_boot_src.u16[1] << BLK_SIZE_BITS; - - if (kernel->compile_time == sys_compile_time) - { - "AHCI: Found sys_compile_time at BLK %d on Port %d\n", sys_boot_blk, i; - "______________________\n"; - return TRUE; - } - else - "AHCI: Did not find matching sys_compile_time on Port %d\n", i; } } }