From abf7ca521b119650e122217b2cb4a82eec2af4dd Mon Sep 17 00:00:00 2001 From: Paul Tucker Date: Wed, 1 Sep 1999 18:18:38 +0000 Subject: [PATCH] *** empty log message *** --- harbour/ChangeLog | 5 +++++ harbour/source/rtl/filesys.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 1949f143b0..d00ed61615 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,8 @@ +19990901-14:05 EDT Paul Tucker + * source/rtl/filesys.c + * hb_fsread() -> account for the possibility that num read is less + than requested. (It was staying in the while loop forever without this) + 19990901-17:59 GMT+1 Bruno Cantero * source/rdd/dbcmd.c + Added Lock() function diff --git a/harbour/source/rtl/filesys.c b/harbour/source/rtl/filesys.c index 3a51a7f7f7..a505953dfc 100644 --- a/harbour/source/rtl/filesys.c +++ b/harbour/source/rtl/filesys.c @@ -345,6 +345,10 @@ ULONG hb_fsRead ( FHANDLE hFileHandle, BYTE * pBuff, ULONG ulCount ) break; ulReadTotal += ( ULONG ) uiRead; + + if( uiRead < ulCount - ulReadTotal ) + break; + } s_uiErrorLast = errno;