Fix Bugzilla Bug 1956: all file opens fail under specific conditions.
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1323 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
4a8c30c6e2
commit
acbc504765
@ -392,7 +392,8 @@ STATIC long get_free_hndl(void)
|
||||
psp FAR *p = MK_FP(cu_psp, 0);
|
||||
UBYTE FAR *q = p->ps_filetab;
|
||||
UBYTE FAR *r = fmemchr(q, 0xff, p->ps_maxfiles);
|
||||
return FP_OFF(r) == 0 ? DE_TOOMANY : r - q;
|
||||
if (FP_SEG(r) == 0) return DE_TOOMANY;
|
||||
return (unsigned)(r - q);
|
||||
}
|
||||
|
||||
STATIC sft FAR *get_free_sft(COUNT * sft_idx)
|
||||
|
Loading…
Reference in New Issue
Block a user