1
0
mirror of https://github.com/FDOS/kernel.git synced 2025-04-08 17:15:17 +02:00

Fix incompletion on loading huge (more than 65280 bytes) binary device driver

This commit is contained in:
lpproj 2015-09-22 12:02:57 +09:00
parent 5756cf8d26
commit 2394f842ce

@ -469,7 +469,8 @@ COUNT DosComLoader(BYTE FAR * namep, exec_blk * exp, COUNT mode, COUNT fd)
/* rewind to start */
SftSeek(fd, 0, 0);
/* read everything, but at most 64K - sizeof(PSP) */
DosRWSft(fd, 0xff00, sp, XFR_READ);
/* lpproj: some device drivers (not exe) are larger than 0xff00bytes... */
DosRWSft(fd, (mode == OVERLAY) ? 0xfffeU : 0xff00U, sp, XFR_READ);
DosCloseSft(fd, FALSE);
}