From 0d16215fefb67774030a1c5e357e73a7ebaaccbf Mon Sep 17 00:00:00 2001 From: Kenneth J Davis Date: Thu, 7 May 2009 01:42:16 +0000 Subject: [PATCH] adjust so FCB reads return data (fix loading of config file [assign.sys] by GEM versions that use FCBs) git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@1374 6ac86273-5f31-0410-b378-82cca8765d1b --- kernel/fcbfns.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel/fcbfns.c b/kernel/fcbfns.c index 1b1c577..dfa9d21 100644 --- a/kernel/fcbfns.c +++ b/kernel/fcbfns.c @@ -251,8 +251,9 @@ UBYTE FcbReadWrite(xfcb FAR * lpXfcb, UCOUNT recno, int mode) /* Convert to fcb if necessary */ lpFcb = ExtFcbToFcb(lpXfcb); + recsiz = lpFcb->fcb_recsiz; - bigsize = (ULONG)recsiz * recno; + bigsize = (ULONG)recsiz * (recno+1); if (bigsize > 0xffff) return FCB_ERR_SEGMENT_WRAP; size = (unsigned)bigsize; @@ -557,8 +558,8 @@ UBYTE FcbRename(xfcb FAR * lpXfcb) { if (*pFromPattern != '?') *pToName = *pFromPattern; - pToName++; - pFromPattern++; + pToName++; + pFromPattern++; } SecPathName[0] = 'A' + FcbDrive - 1;