mirror of
https://github.com/FDOS/kernel.git
synced 2025-07-26 07:15:03 +02:00
fcbfns: Fix for FcbFindFirstNext [fixes #40]
The "next" part of this function never returned any results, initialise only on the first call. Fix by @stsp, minor edits @andrewbird
This commit is contained in:
parent
de7f0d6489
commit
ab1e31e0ba
@ -643,7 +643,9 @@ UBYTE FcbFindFirstNext(xfcb FAR * lpXfcb, BOOL First)
|
|||||||
|
|
||||||
/* Next initialze local variables by moving them from the fcb */
|
/* Next initialze local variables by moving them from the fcb */
|
||||||
lpFcb = CommonFcbInit(lpXfcb, SecPathName, &FcbDrive);
|
lpFcb = CommonFcbInit(lpXfcb, SecPathName, &FcbDrive);
|
||||||
/* Reconstrct the dirmatch structure from the fcb - doesn't hurt for first */
|
if (First)
|
||||||
|
{
|
||||||
|
/* Reconstruct the dirmatch structure from the fcb */
|
||||||
Dmatch.dm_drive = lpFcb->fcb_sftno;
|
Dmatch.dm_drive = lpFcb->fcb_sftno;
|
||||||
|
|
||||||
fmemcpy(Dmatch.dm_name_pat, lpFcb->fcb_fname, FNAME_SIZE + FEXT_SIZE);
|
fmemcpy(Dmatch.dm_name_pat, lpFcb->fcb_fname, FNAME_SIZE + FEXT_SIZE);
|
||||||
@ -654,6 +656,7 @@ UBYTE FcbFindFirstNext(xfcb FAR * lpXfcb, BOOL First)
|
|||||||
Dmatch.dm_dircluster = lpFcb->fcb_dirclst;
|
Dmatch.dm_dircluster = lpFcb->fcb_dirclst;
|
||||||
|
|
||||||
wAttr = D_ALL;
|
wAttr = D_ALL;
|
||||||
|
}
|
||||||
|
|
||||||
if ((xfcb FAR *) lpFcb != lpXfcb)
|
if ((xfcb FAR *) lpFcb != lpXfcb)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user